A sophisticated business chatbot built with Gradio and OpenAI/Gemini that serves as an intelligent concierge for Athlete's Temple fitness and martial arts club.
https://huggingface.co/spaces/bob-t/gym-manager-chatbot-agent/tree/main
- Intelligent Q&A: Answers questions about the business using a comprehensive knowledge base
- Lead Collection: Automatically captures customer interest and contact information
- Feedback Logging: Records unanswered questions for follow-up by staff
- Tool Integration: Uses OpenAI function calling for automated data collection
- Mobile-Friendly UI: Built with Gradio for responsive web interface
- Dual Provider Support: Works with both OpenAI and Gemini APIs
├── business_agent.ipynb # Main Jupyter notebook with chatbot implementation
├── feedback.csv # Logged unanswered questions and feedback
├── leads.csv # Collected customer leads and contact information
├── me/
│ ├── business_summary.txt # Core business knowledge base
│ └── about business.pdf # Additional business documentation
├── 1. C3 - Assignment.pdf # Assignment instructions
├── requirements.txt # Python dependencies
└── README.md # This file
- Python 3.8+
- OpenAI API key or Gemini API key
- Clone this repository:
git clone <repository-url>
cd athlete-temple-chatbot- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
Create a
.envfile in the project root:
OPENAI_API_KEY=your_openai_api_key_here
PROVIDER=openai
OPENAI_MODEL=gpt-4o-mini
OPENAI_TEMPERATURE=0.6
OPENAI_TOP_P=0.9
OPENAI_MAX_TOKENS=400- Open the Jupyter notebook:
jupyter notebook business_agent.ipynb-
Run all cells to start the application
-
The Gradio interface will launch automatically with a local URL and public sharing link
The chatbot uses me/business_summary.txt as its authoritative source of information about Athlete's Temple, including:
- Mission and services
- Team member profiles
- Unique value propositions
The chatbot includes two main tools:
record_customer_interest: Captures customer contact information and notes when they express interestrecord_feedback: Logs questions that couldn't be answered from the knowledge base
- Leads: Stored in
leads.csvwith timestamp, name, email, notes, and source - Feedback: Stored in
feedback.csvwith timestamp, user message, status, and tags
- "What martial arts classes do you offer?"
- "Tell me about your personal training programs"
- "Who are your coaches?"
When customers express interest or ask questions not covered in the knowledge base, the chatbot automatically:
- Logs the interaction
- Asks for contact information
- Saves the lead for follow-up
- Frontend: Gradio web interface
- Backend: OpenAI API with function calling
- Data Storage: CSV files for leads and feedback
- Knowledge Management: Text-based business summary
agentic_chat_once(): Core chat function with tool callingrecord_customer_interest(): Lead capture functionalityrecord_feedback(): Feedback logging system- Gradio UI with multiple tabs for chat, leads, and logs
The application supports various configuration options through environment variables:
PROVIDER: Choose between "openai" or "gemini"OPENAI_MODEL: Specify the OpenAI model to useOPENAI_TEMPERATURE: Control response creativity (0.0-1.0)OPENAI_TOP_P: Control response diversity (0.0-1.0)OPENAI_MAX_TOKENS: Limit response length
- All customer data is stored locally in CSV files
- No data is sent to external services except for AI processing
- Sensitive information should be handled according to privacy regulations
- Integration with CRM systems
- Email automation for lead follow-up
- Analytics dashboard for lead conversion
- Multi-language support
- Voice interface integration
This project is part of an academic assignment for EECE 798S course.
For questions about this implementation, please refer to the assignment documentation or course instructor.