Spaces:
No application file
No application file
File size: 506 Bytes
fc210ca 91bf037 11e1d44 91bf037 fc210ca 91bf037 11e1d44 fc210ca 3587a47 11e1d44 fc210ca 91bf037 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
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
}
|