--- title: Schema Study - BILD 5 emoji: 📚 colorFrom: green colorTo: gray sdk: streamlit sdk_version: 1.51.0 app_file: app.py pinned: true license: gpl-3.0 short_description: AI-enhanced study app for UCSD BILD5 biology students --- # Schema Study: An AI-Enhanced Study App for Biology Students Schema Study is a modern, interactive study app designed to help biology students master core course concepts through AI-powered conversations. The app leverages OpenAI's latest GPT models via the Responses API to provide instant feedback, Socratic questioning, and personalized study support. ## Features - **Password Protection:** Secure access for your class or group. - **Customizable Terms:** Use your own CSV file of terms and definitions. - **Prompt Templates:** Engage with the material using creative, research-based prompts including midterm review. - **AI-Enhanced Feedback:** Get instant, formative feedback and guidance using GPT-5.1 (default) or GPT-4.1. - **Web Search Support:** Optional web search functionality for current information and citations (configurable in `config.py`). - **Real-Time Streaming:** Live token-by-token response streaming with visual typing indicator. - **Professional, Accessible UI:** Clean, modern design with a color palette for clarity and focus. ## How to Use (Students) 1. **Access the App:** Go to your Hugging Face Space URL. Enter the password provided by your instructor. 2. **Select a Term:** Use the dropdown to pick a course term. 3. **Start Studying:** Respond to the prompt or use a template button to begin your session. 4. **Chat with the AI:** Ask questions, answer prompts, and explore the term in depth. ## How to Use (Instructors) ### Setup 1. **Clone or Fork the Space:** ```bash git clone https://huggingface.co/spaces// cd ``` 2. **Edit Configuration:** - Update `config.py` for your course (title, instructions, prompt templates, etc). - Configure AI model settings: - `ai_model`: Choose "gpt-5.1" (default) or "gpt-4.1" - `reasoning_effort`: For GPT-5.1, set to "none" (fastest), "minimal", "low", or "medium" - `enable_web_search`: Set to `True` or `False` (default: True) - Place your terms CSV (e.g., `terms.csv`) in the root directory. Format: first column = term, second column = context/definition. 3. **Set Secrets:** - Create `.streamlit/secrets.toml` file locally or use Hugging Face Space secrets: ```toml username = "your_username" password = "your_password" OPENAI_API_KEY = "your_openai_api_key" ``` - For Hugging Face Spaces, go to **Settings > Repository secrets** and add the same keys. 4. **Push Changes:** ```bash git add . git commit -m "Update configuration and terms" git push ``` ### Model Selection Guide - **GPT-5.1** (default): Best for most use cases, fastest with reasoning="none", supports web search - **GPT-4.1**: Use if you need temperature control or prefer non-reasoning model, excellent web search support ## Configuration ### AI Model Settings (`config.py`) - **Default Model:** GPT-5.1 with reasoning="none" for faster responses - **Alternative Model:** GPT-4.1 with temperature control - **Web Search:** Configurable via `enable_web_search` (default: True) - **Reasoning Effort:** Configurable for GPT-5.1 (options: "none", "minimal", "low", "medium") - **Temperature:** Configurable for GPT-4.1 (0.0-2.0) ### Other Settings - All settings are in `config.py` (title, instructions, prompt templates, resources, AI model parameters, etc). - Theming is managed via `.streamlit/config.toml` and custom CSS in `app.py`. - Dependencies are listed in `requirements.txt`. ## Technical Details ### API & Models - **API Framework:** OpenAI Responses API (streaming-enabled) - **Supported Models:** GPT-5.1 (default), GPT-4.1 - **Streaming:** Real-time token-by-token response streaming - **Inactivity Guard:** Streaming stops after 60s of no server deltas ### File Structure - `app.py` — Main Streamlit app with Responses API integration - `config.py` — All app settings and customization (model selection, web search, prompt templates) - `.streamlit/secrets.toml` — Authentication credentials and API key (not tracked in git) - `requirements.txt` — Python dependencies - `terms.csv` — Your course terms and definitions (CSV format: term, context) - `BILD_5_Syllabus_Reuther_SP25.pdf` — Example resource - `BILD 5 F25 Midterm Exam.pdf` — Midterm exam resource ## License This project is licensed under the GNU GPL-3 License. See the [LICENSE](LICENSE) file for details. ## Acknowledgments Developed by Keefe Reuther, Assistant Teaching Professor in the UC San Diego School of Biological Sciences. Special thanks to Dr. Liam O Mueller and the members of the Reuther Lab for their support and contributions.