agent / README.md
sachin-philip's picture
temp changes
6b8cb8c
|
raw
history blame
1.42 kB
metadata
title: Agentic Assistant
emoji: 🐠
colorFrom: green
colorTo: red
sdk: gradio
sdk_version: 5.38.0
app_file: app.py
pinned: false

Agentic Assistant

A Gradio-based chat interface powered by LangChain and HuggingFace models.

Setup

1. Install Dependencies

pip install -r requirements.txt

2. Environment Variables

Create a .env file in the project root with the following variables:

# Required: HuggingFace API Token
# Get your free token from: https://huggingface.co/settings/tokens
HUGGINGFACEHUB_API_TOKEN=your_huggingface_token_here

# Optional: SerpAPI Key (for web search functionality)
# Get your key from: https://serpapi.com/
SERPAPI_API_KEY=your_serpapi_key_here

3. Run the Application

python app.py

Features

  • 🤖 Powered by Google's Flan-T5 model
  • 🔍 Optional web search capability (requires SerpAPI key)
  • 💬 Interactive chat interface with Gradio
  • 🛠️ Built with LangChain for agent capabilities

Troubleshooting

  • Missing API Token: Make sure you've set the HUGGINGFACEHUB_API_TOKEN environment variable
  • Import Errors: The code now uses langchain_community imports to avoid deprecation warnings
  • Web Search: If you don't have a SerpAPI key, the agent will run without web search functionality

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference