Spaces:
Sleeping
Sleeping
metadata
title: UnivAI Chatbot
emoji: π€
colorFrom: purple
colorTo: blue
sdk: docker
sdk_version: 1.0.0
app_file: app.py
pinned: false
UnivAI Chatbot Interface & AI Backend
This project merges a React UI (Vite) and a Flask AI backend into a single Hugging Face Space using Docker.
Features
- Conversational UI for university handbook queries
- AI backend (Sentence Transformers + LLM) for semantic search and natural responses
- Feedback API for upvote/downvote tuning
Running Locally
docker build -t univai-chatbot .
docker run -p 7860:7860 univai-chatbot
- UI available at
http://localhost:7860 - API available at
http://localhost:7860/api/chatand/api/feedback
Endpoints
- POST /api/chat
{ "query": "your question", "dev_mode": false }β{ "response": "answer" } - POST /api/feedback
{ "query": "...", "response": "...", "feedback": "positive"|"negative" }β{ "status": "success" }
Hugging Face Spaces
- Push this repo and select Docker SDK.
- The UI and AI will run together, with Nginx proxying
/api/to the backend.
File Structure
src/β React UIapp.pyβ Flask AI backendDockerfileβ unified buildnginx.confβ reverse proxy configrequirements.txtβ Python dependenciesdataset.jsonβ university Q&A set
Connecting UI to AI
- The UI should send requests to
/api/chatand/api/feedback.