Chatbot / README .md
HARISARAVANANM's picture
Rename README (1).md to README .md
c810664 verified
metadata
title: AI Chatbot
emoji: πŸ€–
colorFrom: violet
colorTo: purple
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false

AI Chatbot β€” Powered by Claude

A clean, streaming AI chatbot built with Gradio and Anthropic's Claude.

πŸš€ Deploy on Hugging Face Spaces

  1. Create a new Space at https://huggingface.co/new-space

    • SDK: Gradio
    • Visibility: Public or Private
  2. Upload these files (app.py, requirements.txt, README.md) to the Space repo.

  3. Add your API key as a Secret:

    • Go to your Space β†’ Settings β†’ Variables and secrets
    • Add a secret named ANTHROPIC_API_KEY with your key from https://console.anthropic.com
  4. The Space will build automatically and your chatbot will be live! πŸŽ‰

πŸ’» Run Locally

# Install dependencies
pip install -r requirements.txt

# Set your API key
export ANTHROPIC_API_KEY=your_key_here   # Mac/Linux
set ANTHROPIC_API_KEY=your_key_here      # Windows

# Launch
python app.py

Then open http://localhost:7860 in your browser.

βš™οΈ Customisation

Edit the SYSTEM_PROMPT variable in app.py to give your chatbot a custom personality or role.