An open API service indexing awesome lists of open source software.

https://github.com/arunishrajput/student-feedback-analyzer

AI based Student Feedback Analyzer
https://github.com/arunishrajput/student-feedback-analyzer

ai feedback mysql python railway streamlit word-clouds

Last synced: about 2 months ago
JSON representation

AI based Student Feedback Analyzer

Awesome Lists containing this project

README

          

# ๐Ÿ“š Student Feedback Analyzer

A **beginner-friendly Python project** that collects, stores, and analyzes student feedback using:

- ๐Ÿ—„๏ธ **MySQL** โ€“ for database storage
- ๐ŸŒ **Streamlit** โ€“ for interactive UI
- ๐Ÿค– **Google Gemini AI** โ€“ for sentiment analysis & automated summaries
- ๐ŸŽจ **WordCloud + Charts** โ€“ for data visualization

---

## ๐Ÿš€ Features

- โœ… **Feedback Submission** โ€“ Students can enter name, subject, rating, and comments.
- โœ… **Database Integration** โ€“ Feedback stored securely in a MySQL database.
- โœ… **Dashboard**:

- View all feedback in tabular format.
- See **average rating per subject** in bar charts.
- **Subject-wise Analysis** with:

- Word Cloud of comments
- AI-powered Sentiment Analysis (Positive/Negative/Neutral)
- AI-generated Summary of all feedback

---

## ๐Ÿ—๏ธ Project Architecture

```text
+----------------+ +------------------+ +-------------------+
| Streamlit UI | <--> | MySQL Database | <--> | Data Storage |
+----------------+ +------------------+ +-------------------+
|
v
+----------------+ +---------------------------+
| WordCloud & | | Google Gemini AI API |
| Charts | <--> | (Sentiment + Summarizer) |
+----------------+ +---------------------------+
```

---

## โš™๏ธ Tech Stack

- **Language**: Python
- **Framework**: Streamlit
- **Database**: MySQL
- **Visualization**: Matplotlib, WordCloud
- **AI**: Google Gemini (via Google AI Studio API)

---

## ๐Ÿ“‚ Project Structure

```
student-feedback-analyzer/
โ”‚
โ”œโ”€โ”€ app.py # Main Streamlit app
โ”œโ”€โ”€ requirements.txt # Python dependencies
โ”œโ”€โ”€ .env # Environment variables (API key, DB creds)
โ””โ”€โ”€ README.md # Project documentation
```

---

## ๐Ÿ“ฆ Installation & Setup

### 1. Clone the repository

```bash
git clone https://github.com/arunishrajput/student-feedback-analyzer.git
cd student-feedback-analyzer
```

### 2. Install dependencies

```bash
pip install -r requirements.txt
```

**requirements.txt** should include:

```txt
streamlit
mysql-connector-python
pandas
matplotlib
wordcloud
python-dotenv
google-genai
```

### 3. Setup MySQL Database

```sql
CREATE DATABASE feedback_db;
USE feedback_db;

CREATE TABLE feedback (
id INT AUTO_INCREMENT PRIMARY KEY,
student_name VARCHAR(100),
subject VARCHAR(100),
rating INT,
comments TEXT,
date_submitted TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
```

### 4. Configure Environment Variables

Create a `.env` file in the project root:

```ini
# Google Gemini API Key
GEMINI_API_KEY=your_google_ai_studio_api_key_here

# MySQL Config
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_mysql_password
DB_NAME=feedback_db
```

### 5. Run the app

```bash
streamlit run app.py
```

---

## ๐ŸŽฎ Usage Flow

1. **Submit Feedback**

- Enter Name, Subject, Rating, Comments
- Data saved to MySQL

2. **Dashboard**

- View all raw feedback in a table
- See average ratings (per subject)
- Choose a subject โ†’ WordCloud + Sentiment + AI Summary

---

## ๐Ÿ“Š Example Output

- **Word Cloud**

- **Average Ratings**

```text
Physics 4.2
Chemistry 3.8
Mathematics 4.5
```

- **Sentiment Counts (Chemistry)**

```json
{
"Positive": 12,
"Negative": 3,
"Neutral": 5
}
```

- **AI Summary Example**

> โ€œMost students appreciated the clarity of explanations.
> A few suggested more real-world examples.
> Overall feedback is positive with some scope for improvement.โ€

---

## ๐Ÿ’ก Future Improvements

- ๐Ÿ” Add login system (students/teachers)
- ๐Ÿ“ค Export reports (PDF/Excel)
- ๐Ÿ“ˆ Compare subject feedback across semesters
- ๐ŸŽค Voice-based feedback submission

---

## ๐ŸŽค Demo Script (for presentation)

See ๐Ÿ‘‰ [Demo Script Guide](./Demo.md) _(extra file for classroom presentation)_

---

## ๐Ÿ‘จโ€๐Ÿ’ป Author

- **Arunish** (CSE Student, 1st Year)