This project is a Student Assessment Feedback System that uses AI to provide personalized feedback on student answers. It leverages OpenAI's GPT model and ChromaDB for efficient content storage and retrieval.
- Embeds and stores module content using ChromaDB
- Loads questions and answers from a JSON file
- Collects student answers through a Streamlit interface
- Generates AI-powered feedback based on student responses and relevant content
-
Clone the repository:
git clone https://github.com/your-username/student-assessment-feedback-system.git cd student-assessment-feedback-system
-
Set up your environment variables: Create a
.env
file in the project root and add your OpenAI API key:OPENAI_API_KEY=your_api_key_here DB_USERNAME=your_db_username DB_PASSWORD=your_db_password DB_HOST=your_postgresql_host DB_PORT=5432 # Default PostgreSQL port DB_NAME=your_db_name
-
Set up Docker:
Build the Docker image: In the project directory, build the Docker image using the provided Dockerfile:
docker build -t student-assessment-feedback-system .
-
Run the Docker container: Once the image is built, you can run the container. Make sure to pass the environment variables using the .env file. This file should contain your PostgreSQL connection settings and the OpenAI API key.
docker run --env-file .env -p 8501:8501 student-assessment-feedback-system
This will run the application in a containerized environment on port 8501. You can access the Streamlit interface at http://localhost:8501.
-
Prepare your module content: Place your PDF file in the appropriate directory and update the
module_content_fp
variable in the script. -
Prepare your questions and answers: Create a JSON file with questions and answers, and update the
questions_fp
variable in the script. -
Set up PostgreSQL: Ensure that your PostgreSQL instance is running and accessible. You can either use a local PostgreSQL server or a managed service like AWS RDS or Heroku Postgres. If running locally, use Docker to set up a PostgreSQL container if needed.
-
Open the provided URL in your web browser to access the Student Assessment Feedback System.