Skip to content

BL53-P4NTH3R/Few-shot_learning_app

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Few-Shot Learning App with Gemini 1.5 (Streamlit)

This is a lightweight interactive app built with Streamlit and Google's Gemini 1.5 Flash model. It allows you to type in prompts, experiment with model parameters like temperature and top_p, and instantly see the AI's response. Ideal for learning, prototyping, and exploring how large language models behave.


🌟 Features

  • πŸ” Secure Google API key entry
  • πŸ’¬ Dynamic prompt input
  • πŸŽ›οΈ Adjustable generation parameters:
    • Temperature
    • Top-p (nucleus sampling)
    • Top-k
    • Max output tokens
  • πŸ“œ Prompt & response history (scrollable)
  • πŸ§ͺ Built on Gemini 1.5 Flash (gemini-1.5-flash-latest)
  • ⚑ Runs entirely on your local machine

πŸ” How to Get a Google API Key

  1. Visit: https://aistudio.google.com/app/apikey
  2. Sign in with your Google account
  3. Click β€œCreate API key”
  4. Copy the key (it starts with AIza...)
  5. You’ll paste this key into the app when it runs

πŸ’» Run Locally on Your Computer

1. Clone the Repository

git clone https://github.com/Bayero-abdul/Few-shot_learning_app.git
cd few-shot_learning_app

2. (Optional) Create a Virtual Environment

python -m venv venv
source venv/bin/activate      # macOS/Linux
venv\Scripts\activate         # Windows

3. Install Dependencies

pip install streamlit google-generativeai

4. Run the App

streamlit run app.py

Then go to http://localhost:8501 in your browser.


πŸ“‚ Project Files

File Description
app.py The main Streamlit application
README.md This file

🧠 What Is Gemini?

Gemini is Google DeepMind’s family of large language models. This app uses the Gemini 1.5 Flash version β€” optimized for fast, cost-effective inference. Great for chat, summarization, coding, and more.

πŸ“š Learn more about Gemini


πŸ“˜ Resources


πŸ™Œ Acknowledgments

Created by Bayero Abdul
This tool was built as part of the MLC Nigeria study group project to learn how to prototype with large language models and explore prompt engineering.


πŸ“œ License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%