studybuddy / README.md
duhitsayu's picture
Update README.md
b2c774a verified

A newer version of the Streamlit SDK is available: 1.54.0

Upgrade
metadata
license: mit
title: studdybuddy
sdk: streamlit
emoji: 📚
short_description: make ur studies fun and easier with ai

Personalized Study Buddy App

->

A smart, AI-powered learning tool. Enter any topic, choose a mode (Explain or Quiz), and get instant, personalized study content—perfect for students and learners! This app leverages cutting-edge AI to generate beginner-friendly explanations or multiple-choice quizzes on demand.

Screenshots

image output- image

Features

  • Dual Modes:
    • Explain: Get a concise, 100-word explanation of any topic.
    • Quiz: Receive 3 multiple-choice questions with answers to test your knowledge.
  • Instant AI Responses: Powered by Google Gemini (free tier) or adaptable to other LLMs.
  • User-Friendly Interface: Built with Streamlit for a clean, interactive experience.
  • Error Handling: Graceful fallbacks for empty inputs or API hiccups.

Demo

  • Explain Mode: Input "Python loops" → "Loops in Python repeat code. A for loop iterates over a sequence..."
  • Quiz Mode: Input "Photosynthesis" → "1. What gas do plants use? a) Oxygen b) CO2 Answer: b)..."

Tech Stack

  • Frontend: Streamlit - Python-based web app framework.
  • Backend: Python - Logic and API integration.
  • AI: Google Gemini API - Free tier for text generation.
  • Environment: Local or virtual env (e.g., venv).

Prerequisites

Installation

  1. Clone the Repo:
    git clone https://github.com/yourusername/personalized-study-buddy.git
    cd personalized-study-buddy
    
  2. Set Up Virtual Environment (Optional but Recommended):
    python -m venv venv
    source venv/bin/activate  # Mac/Linux
    venv\Scripts\activate     # Windows
    
  3. Install Dependencies:
    pip install streamlit google-generativeai
    
  4. Add Your API Key:
    • Sign up at makersuite.google.com, get a Gemini API key.
    • Replace "your-gemini-api-key-here" in study_buddy.py with your key:
      genai.configure(api_key="your-gemini-api-key-here")
      

Running the App

  1. Start the App:
    streamlit run study_buddy.py
    
  2. Open Your Browser:
    • Go to http://localhost:8501.
    • Enter a topic, pick a mode, hit "Go"—watch AI do its magic!

Usage

  • Explain Mode: Type "Blockchain" → Get a simple explanation.
  • Quiz Mode: Type "Cell division" → Answer 3 MCQs.
  • Error Handling: No topic? See "Please enter a topic!" API down? Fallback text appears.

Alternative APIs

Ran out of OpenAI credits? Try these:

  • Hugging Face: Use mistralai/Mixtral-8x7B-Instruct-v0.1 (free tier, pip install huggingface_hub).
  • OpenAI: Add billing at platform.openai.com if you prefer GPT.

Contributing

  • Fork this repo, tweak the code, submit a pull request—let’s make learning smarter together!
  • Issues? Open a ticket here.

License

MIT License—free to use, modify, and share. See LICENSE for details.

Acknowledgments

  • Built with ❤️ by [akki].

Happy coding, and good luck! 🚀