Transform your handwritten notes and YouTube lectures into interactive flashcards using cutting-edge AI
Demo β’ Features β’ Quick Start β’ Documentation β’ Contributing
Soru.ai is an intelligent educational platform that leverages state-of-the-art AI models to revolutionize how students learn. Upload your handwritten notes or paste a YouTube lecture URL, and watch as our AI generates personalized, high-quality flashcards tailored to your learning style.
Quick Flow:
- π€ Upload your handwritten notes or paste a YouTube lecture URL
- π AI Processing extracts text via OCR (TrOCR) or transcript (YouTube API)
- π§ Smart Generation creates flashcards using Google Gemini Pro
- π Interactive Learning study with clickable, flippable flashcards
Students spend countless hours manually creating flashcards from their notes and lectures. This process is:
- β° Time-consuming: Hours spent on card creation instead of actual studying
- π Inconsistent: Quality varies based on note-taking skills
- π Redundant: Same content reformatted repeatedly across different courses
Soru.ai automates flashcard generation using:
- OCR Technology: Microsoft's TrOCR model for handwritten text recognition
- AI Generation: Google Gemini Pro for intelligent question-answer pair creation
- Multi-source Support: Process both images and YouTube video transcripts
- Interactive UI: Beautiful, responsive interface built with Reflex
- Upload images of your handwritten notes
- Advanced OCR powered by Microsoft's TrOCR model
- Supports various handwriting styles and formats
- Automatic text extraction and parsing
- Paste any YouTube lecture URL
- Automatic transcript extraction (supports English and Russian)
- AI-powered summarization and concept extraction
- Perfect for MOOC courses and online lectures
- Intelligent question-answer pair creation
- Context-aware content analysis
- Optimized for active recall and spaced repetition
- Character limits for optimal learning (100 chars per side)
- Beautiful gradient design with smooth animations
- Drag-and-drop file upload
- Interactive card flipping
- Real-time processing indicators
- Responsive design for all devices
- Environment-based configuration
- API key protection
- Secure file handling
- No data retention beyond session
βββββββββββββββββββ
β User Input β
β (Image/URL) β
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββ
β Soru.ai Platform β
β ββββββββββββββββββββββββββββββββ β
β β OCR Processing β β
β β (TrOCR Handwritten Model) β β
β ββββββββββββ¬ββββββββββββββββββββ β
β β β
β βΌ β
β ββββββββββββββββββββββββββββββββ β
β β YouTube Transcript API β β
β β (Multi-language Support) β β
β ββββββββββββ¬ββββββββββββββββββββ β
β β β
β βΌ β
β ββββββββββββββββββββββββββββββββ β
β β Google Gemini Pro β β
β β (Flashcard Generation) β β
β ββββββββββββ¬ββββββββββββββββββββ β
β β β
βββββββββββββββΌβββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββ
β Interactive β
β Flashcards β
ββββββββββββββββββ
| Component | Technology | Purpose |
|---|---|---|
| Frontend Framework | Reflex 0.4.8+ | Reactive Python-based UI |
| AI Model | Google Gemini Pro | Flashcard content generation |
| OCR Engine | Microsoft TrOCR | Handwriting recognition |
| Video Processing | YouTube Transcript API | Lecture content extraction |
| Backend | Python 3.11+ | Core application logic |
| State Management | Reflex State | Real-time UI updates |
- Python 3.11 or higher
- Google Gemini API key (Get one here)
- Hugging Face API token (Get one here)
-
Clone the repository
git clone https://github.com/yourusername/soru.ai.git cd soru.ai -
Create and activate virtual environment
python -m venv venv # On macOS/Linux source venv/bin/activate # On Windows venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
cp .env.example .env
Edit
.envand add your API keys:GOOGLE_API_KEY=your_google_gemini_api_key_here HUGGINGFACE_API_KEY=your_huggingface_api_key_here
-
Initialize Reflex
reflex init
-
Run the application
reflex run
-
Open your browser
Navigate to http://localhost:3000
soru.ai/
βββ lahacks_24/
β βββ __init__.py
β βββ lahacks_24.py # Main application logic
βββ assets/ # Static assets (images, icons)
βββ uploaded_files/ # Temporary file storage (gitignored)
βββ .env # Environment variables (gitignored)
βββ .env.example # Environment template
βββ .gitignore # Git ignore rules
βββ requirements.txt # Python dependencies
βββ rxconfig.py # Reflex configuration
βββ README.md # This file
- Click on the upload area or drag-and-drop your image
- Select an image of your handwritten notes (JPG, PNG)
- Click "Upload" button
- Wait for AI processing (usually 10-30 seconds)
- View and interact with your generated flashcards
- Copy a YouTube video URL (e.g.,
https://www.youtube.com/watch?v=VIDEO_ID) - Paste it into the YouTube link input field
- Click "Generate YouTube Notes"
- AI extracts transcript and creates flashcards
- Study your personalized flashcards
class State(rx.State):
img: list # Uploaded image filenames
cards_list: list[tuple] # (front, back) flashcard pairs
visual_cards_list: list # Currently visible card sides
processing: bool # Processing status indicator
complete: bool # Completion statuscreate_flashcard_prompt(): Processes uploaded images via OCR and generates flashcardscreate_youtube_prompt(): Extracts YouTube transcripts and generates flashcardsswap_card(): Flips flashcard between front and backsplit_flashcards_list(): Parses AI output into structured flashcard pairs
Beautiful gradient interface with dual input options
Real-time processing with elegant loading indicators
Click any card to flip between question and answer
reflex run --env dev| Variable | Description | Required |
|---|---|---|
GOOGLE_API_KEY |
Google Gemini Pro API key | β Yes |
HUGGINGFACE_API_KEY |
Hugging Face API token | β Yes |
APP_NAME |
Application identifier | No |
DEBUG |
Enable debug mode | No |
The project follows Python best practices:
- Type hints for better code clarity
- Async/await for efficient I/O operations
- Clean separation of concerns
- Environment-based configuration
- Secure credential management
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- π Multi-language support
- π± Mobile app development
- π§ Additional AI model integrations
- π― Spaced repetition algorithm
- π Learning analytics dashboard
- π¨ UI/UX improvements
- Handwritten note OCR processing
- YouTube video transcript integration
- Google Gemini flashcard generation
- Interactive card flipping interface
- User authentication and profiles
- Flashcard deck management
- Spaced repetition scheduling
- Export to Anki/Quizlet
- Mobile app (iOS/Android)
- Collaborative study groups
- Performance analytics
- Multi-language UI support
- PDF document processing
- Audio lecture transcription
- No API keys in code: All credentials managed via environment variables
- Secure file handling: Temporary uploads cleaned automatically
- No data persistence: User content not stored on servers
- HTTPS enforced: Secure communication in production
To report security vulnerabilities, please email: [email protected]
This project is licensed under the MIT License - see the LICENSE file for details.
Soru.ai was created at LA Hacks 2024 by passionate developers who believe in making education more accessible and efficient.
- Project Lead: Your Name
- Contributors: View all contributors
- Reflex - Amazing Python web framework
- Google Gemini - Powerful AI language model
- Microsoft TrOCR - Handwriting recognition
- YouTube Transcript API - Transcript extraction
- LA Hacks 2024 - For the incredible opportunity
- π Website: soru.ai
- π§ Email: [email protected]
- π¦ Twitter: @soruai
- π¬ Discord: Join our community
Made with β€οΈ and β by students, for students
Star β this repo if you find it helpful!
