Phoenix is a Streamlit app that generates editable flashcards from study material. It accepts pasted text or uploaded PDF, DOCX, and TXT files, then uses Gemini structured outputs with Pydantic validation to return a predictable flashcard format.
- Upload
.pdf,.docx, or.txtfiles, or paste raw text. - Choose a subject to guide the flashcard style.
- Generate question-answer flashcards using Gemini.
- Validate the LLM response with Pydantic models.
- Review and edit flashcards in the UI.
- Export flashcards as CSV or JSON.
- Streamlit
- Python
- Google GenAI SDK
- Pydantic
- PyPDF2
- python-docx
- Docker
- pytest
Phoenix/
├── Dockerfile
├── README.md
├── requirements.txt
├── src/
│ ├── app.py
│ ├── models/flashcard.py
│ ├── services/llm_service.py
│ └── utils/document_parser.py
└── tests/test_gemini_flashcards.py
git clone https://github.com/techwallahexplorer/Phoenix.git
cd Phoenix
cp .env.example .env
pip install -r requirements.txt
streamlit run src/app.pySet your Gemini key in .env:
GEMINI_API_KEY=your_gemini_api_key_heredocker build -t phoenix-flashcards .
docker run -p 8501:8501 -e GEMINI_API_KEY=your_gemini_api_key_here phoenix-flashcardspytest tests/ -vThe test suite mocks Gemini calls so CI does not depend on live API keys.
This project is a learning/product prototype. It demonstrates document parsing, LLM structured output handling, validation, and simple export workflows.