File size: 2,013 Bytes
2eef3a3
 
 
 
 
 
 
 
 
 
 
97ab6aa
d957963
a0e3cf7
d957963
 
17fdce9
a0e3cf7
 
 
 
 
 
d957963
 
 
 
 
 
 
a0e3cf7
 
 
 
 
 
 
 
 
 
 
 
 
 
d663153
97ab6aa
d957963
a0e3cf7
 
 
 
 
 
 
 
 
 
 
6d3ec25
a0e3cf7
 
6d3ec25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
title: QuizCraftAi
emoji: 🧠
colorFrom: pink
colorTo: purple
sdk: streamlit
sdk_version: "1.32.0"
app_file: app.py
pinned: false
---

# πŸ“šAI-Powered Custom Quiz Generator - QuizCraft Ai 

Generate personalized MCQs, short answer, and true/false questions using Hugging Face Transformers and a Streamlit UI.

## πŸ’‘ Features
- Question generator (MCQ, short answer, true/false)
- Streamlit-based frontend
- Cosine Similarity, BLEU-1, ROUGE -1 AND ROUGE-L Evaluation
- Fine-tuned FLAN-T5 integration
- Customization: Select topic, difficulty, and number of questions



## πŸš€ How to Run

```bash
git clone https://github.com/YOUR_USERNAME/custom-quiz-generator.git
cd custom-quiz-generator

# (Optional) Create virtual environment
python -m venv venv
source venv/Scripts/activate  # On Windows
# or
source venv/bin/activate      # On Mac/Linux

# Install required dependencies
pip install -r requirements.txt

# Run the app
streamlit run app.py

```
## Repo Struture
```
custom-quiz-generator/
β”‚
β”œβ”€β”€ app.py                          # Streamlit UI
β”œβ”€β”€ fine_tune_and_evaluation.py     # Fine-tuning & evaluation script
β”œβ”€β”€ flan_t5_finetuned_model/        # Directory storing the fine-tuned FLAN-T5 model
β”œβ”€β”€ mcq_generator.py                # MCQ generation script                  
β”œβ”€β”€ quiz_logic.py                   # Core quiz generation logic
β”œβ”€β”€ short_answer_generator.py       # Script for short answer generation
β”œβ”€β”€ truefalse_quiz.py               # True/False question generator
β”œβ”€β”€ train_v0.2_QuaC.json            # Training dataset
β”œβ”€β”€ outputs/                        # Stores generated questions/outputs
β”œβ”€β”€ valhalla/                       # T5-based fine-tuned models
β”œβ”€β”€ requirements.txt                # Project dependencies
β”œβ”€β”€ FineTuneAndEvaluationscores.ipynb  # Evaluation notebook
β”œβ”€β”€ README.md                       # Project documentation
└── .gitignore                      # Git ignore rules
```