GemClass is an AI-powered tutoring system that uses Google's Generative AI to provide personalized educational assistance. The system is designed to guide students through their learning process without simply giving away answers, encouraging critical thinking and deep understanding. Made by Sebastian Castro (sec204@pitt.edu) and Daley Fraser (drf58@pitt.edu)
- Project Overview
- Features
- Technology Stack
- Project Structure
- Setup Instructions
- Usage
- Customization
- Planned Updates
GemClass is built to simulate a knowledgeable tutor that adapts to different courses and helps students learn effectively. It uses a chat-based interface where students can ask questions, and the AI responds with guidance, hints, and explanations tailored to the selected course.
- Course-specific AI tutoring
- General AI tutoring
- Chat-based interface for easy interaction
- Markdown support for formatted responses
- Backend: Python with Flask
- Frontend: HTML, CSS, JavaScript
- AI: Google's Generative AI (Gemini model)
- Markdown Parsing: Marked.js library
gemclass/
│
├── app.py # Main Flask application
├── gemini_test.py # Gemini API integration
├── frontend/
│ └── index.html # Main HTML template
├── static/
│ └── steelhacker.png # Logo image
└── class_data/
├── cs50.json # Harvard CS50 course data
└── cs447.json # Pitt CS0447 course data
-
Clone the repository:
git clone https://github.com/yourusername/gemclass.git cd gemclass -
Install the required packages:
pip install flask flask-cors google-generativeai -
Set up Google Cloud credentials:
- Create a Google Cloud project and enable the Generative AI API (follow instructions at
https://ai.google.dev/gemini-api/docs/quickstart) - Download the JSON key file and set the path in
gemini_test.py:key_path = "/path/to/your/credentials.json" os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = key_path
- Create a Google Cloud project and enable the Generative AI API (follow instructions at
-
Prepare course data:
- Create JSON files in the
class_datadirectory for each course you want to support - Follow the structure in existing
cs50.jsonandcs447.jsonfiles
- Create JSON files in the
-
Start the Flask server:
python app.py -
Open a web browser and navigate to
http://127.0.0.1:5000or (if on windows)http://localhost:5000 -
Select a course from the dropdown menu
-
Start chatting with the AI tutor by typing your questions in the input box
- Create a new JSON file in the
class_datadirectory (e.g.,new_course.json) - Follow the structure of existing course files:
{ "lectures": [ {"lecture": "1", "content": "Lecture content..."}, ... ], "extra": [ {"content": "Extra content..."}, ... ] } - Update the
generate_textfunction ingemini_test.pyto include the new course
- Adjust the
system_promptingemini_test.pyto change the AI's personality or behavior - Modify the
generation_configandsafety_settingsingemini_test.pyto fine-tune the AI's responses
- Allow user to specifically choose from which specific lectures for each class the AI should base its answer off from (it currently uses every single lecture)
- Reset functionality to start fresh conversations
- Streamlining process to make adding different classess more user-friendly
- Conversation history management