feedbackChatbot / app.py
aimanathar's picture
Update app.py
ba837c5 verified
raw
history blame contribute delete
506 Bytes
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Question(BaseModel):
question_text: str
@app.get("/")
def home():
return {"message": "🚀 Feedback Chatbot API is live!"}
@app.post("/generate-response")
def generate_response(data: Question):
answer = f"Llama Response: {data.question_text}"
recommendation = "Recommendation: Reflect and take one positive step today."
return {
"answer": answer,
"recommendation": recommendation
}