Skip to content

Simple LLM chatbot API using Hugging Face Inference API and FastAPI

Notifications You must be signed in to change notification settings

MohadesehMatinkia/hf-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Hugging Face Chatbot + FastAPI

A simple and modern LLM-powered Chatbot API built using:

  • 🧠 Hugging Face Inference API (Meta-Llama-3-8B-Instruct)
  • ⚑ FastAPI β€” high-performance Python web framework
  • 🐍 Python 3
  • πŸ” python-dotenv for secure token handling

This project demonstrates how to build a lightweight R&D-style chatbot using open-source LLMs β€” suitable for learning, internships, and real applications.


πŸš€ Features

  • Command-line chatbot (chatbot_hf.py)
  • FastAPI REST API server (main.py)
  • Clean request/response structure using Pydantic
  • Secure environment variable handling via .env
  • Minimal, readable, extendable architecture
  • Ready to deploy or integrate with UI / LangChain

πŸ“¦ Installation

1️⃣ Clone the repository

git clone https://github.com/YOUR_USERNAME/hf-chatbot.git
cd hf-chatbot

About

Simple LLM chatbot API using Hugging Face Inference API and FastAPI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages