| title | emoji | colorFrom | colorTo | sdk | app_port | pinned | secrets | |
|---|---|---|---|---|---|---|---|---|
FAQ Mate |
🚗 |
blue |
green |
docker |
7860 |
false |
|
A simple chatbot that answers questions about Australian car insurance.
- The Gradio interface captures the user's question.
- It sends the question to the FastAPI backend (
/askendpoint). - The FastAPI backend:
- Uses OpenAI embeddings to find relevant FAQs from
data/faqs.json. - Uses an OpenAI chat model to synthesize an answer based on the relevant FAQs.
- Returns the synthesized answer, confidence score, and source information.
- Uses OpenAI embeddings to find relevant FAQs from
- The Gradio interface displays the answer to the user.
- SDK: Docker
- Application Port: 7860 (Gradio interface)
- Secrets: Requires an
OPENAI_API_KEYto be set in the Space secrets. Add your OpenAI API key in the Space settings under "Secrets".
-
Build the Docker image:
docker build -t faq-mate . -
Run the Docker container:
docker run -p 7860:7860 -p 8000:8000 -e OPENAI_API_KEY="your_openai_api_key" faq-mateReplace
"your_openai_api_key"with your actual key.- Access the Gradio UI at
http://localhost:7860 - Access the FastAPI docs at
http://localhost:8000/docs
- Access the Gradio UI at