YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
β‘ Groq Chatbot β Streamlit App
A fast, free AI chatbot powered by Groq and deployed with Streamlit.
Features
- π Free Groq API (no credit card)
- β‘ Blazing fast LLaMA / Mixtral inference
- π 5 built-in personas + custom system prompt
- π Switch models mid-conversation
- πΎ Export conversation as JSON
- π Dark theme UI
Run Locally
# 1. Clone
git clone https://github.com/YOUR_USERNAME/groq-chatbot.git
cd groq-chatbot
# 2. Install
pip install -r requirements.txt
# 3. Set API key (get free at console.groq.com)
export GROQ_API_KEY="gsk_..."
# 4. Run
streamlit run app.py
App opens at http://localhost:8501
Deploy to Streamlit Cloud (Free)
- Push this repo to GitHub
- Go to share.streamlit.io β New app
- Select your repo and set Main file path to
app.py - Click Advanced settings β Secrets and add:
GROQ_API_KEY = "gsk_your_key_here" - Click Deploy β live URL in ~2 minutes β
File Structure
groq-chatbot/
βββ app.py β Streamlit UI
βββ chatbot.py β Groq API logic
βββ requirements.txt β Dependencies
βββ .streamlit/
β βββ config.toml β Theme settings
β βββ secrets.toml β API key (local only, gitignored)
βββ .gitignore
βββ README.md
Customise
Add a new persona β in app.py, add to the personas dict:
"π§ββοΈ Doctor": "You are a medical assistant. Always recommend consulting a real doctor."
Change default model β in chatbot.py:
DEFAULT_MODEL = "llama-3.1-8b-instant" # fastest
Longer memory β in chatbot.py:
MAX_HISTORY_TURNS = 40
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support