rogerscuall's picture
Upload folder using huggingface_hub
bf5275b verified

A newer version of the Gradio SDK is available: 5.42.0

Upgrade
metadata
title: huggingface-small-agent-test
app_file: app.py
sdk: gradio
sdk_version: 5.34.2

HuggingFace Smol-Agent Chatbot

A simple chatbot implementation using HuggingFace's smol-agent.

Setup

  1. Clone this repository
  2. Create a .env file based on .env.example:
    cp .env.example .env
    
  3. Add your HuggingFace API token to the .env file

Usage

Install dependencies

uv pip install .

Run the CLI chatbot

python chatbot.py

Run the API server

python api.py

The API will be available at http://localhost:8000

API Endpoints

  • POST /chat: Send a message to the chatbot

    • Request: {"message": "Hello, how are you?"}
    • Response: {"response": "I'm doing well, thank you for asking!"}
  • GET /health: Check if the API is running

    • Response: {"status": "ok"}