# Egyptian High School Educational Assistant (Streamlit App)
This is a Streamlit-based educational assistant designed to help Egyptian high school students interact with learning content using AI-powered tools.
## π§ Features
1. **Chat with File**
Upload a file (PDF, TXT, or Image), and the assistant will extract its content, summarize it, and allow you to ask questions about it.
2. **Quiz Generator**
Generate multiple-choice questions (MCQs) based on the content you upload or write.
3. **YouTube Video Summarizer**
Paste a YouTube link (Arabic videos only), and the app will summarize the transcript using AI.
_Note: The video must have an Arabic transcript available._
4. **Curriculum-Aware General Chat**
Ask any general educational question and get a smart answer. If it's related to the curriculum, the assistant uses context stored in ChromaDB.
5. **Flashcard Generator**
Upload content and get short question-answer flashcards to study from.
6. **Voice Assistant**
Upload a file or enter a text β the assistant will rewrite it clearly (with Gemini AI) and read it aloud using TTS.
7. **Ask About Image**
Upload an image containing text and ask questions about its content.
_Note: In the online demo version, image file upload might be limited due to Streamlitβs file handling._
---
## π§ Powered by:
- **Gemini 1.5 Pro** (via Google Generative AI)
- **Streamlit** for UI
- **ChromaDB** for curriculum context
- **PyTesseract** for OCR
- **gTTS** for text-to-speech
- **LangDetect** for automatic language detection
---
## π Project Structure (Recommended)
```
project/
β
βββ main.py # Streamlit entry point
βββ requirements.txt
βββ README.md
β
βββ features/ # Feature-based modules
β βββ chat_with_file.py
β βββ quiz_generator.py
β βββ youtube_summarizer.py
β βββ flashcard_generator.py
β βββ general_chat.py
β βββ voice_assistant.py
β βββ image_question.py
β
βββ llm_utils.py # Gemini setup + call_llm()
βββ file_utils. β¦