Spaces:
No application file
No application file
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
from pydantic import BaseModel
|
| 3 |
-
import requests
|
| 4 |
|
| 5 |
app = FastAPI()
|
| 6 |
|
|
@@ -9,14 +8,12 @@ class Question(BaseModel):
|
|
| 9 |
|
| 10 |
@app.get("/")
|
| 11 |
def home():
|
| 12 |
-
return {"message": "🚀 Feedback
|
| 13 |
|
| 14 |
@app.post("/generate-response")
|
| 15 |
def generate_response(data: Question):
|
| 16 |
-
# Dummy response for now
|
| 17 |
answer = f"Llama Response: {data.question_text}"
|
| 18 |
recommendation = "Recommendation: Reflect and take one positive step today."
|
| 19 |
-
|
| 20 |
return {
|
| 21 |
"answer": answer,
|
| 22 |
"recommendation": recommendation
|
|
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
from pydantic import BaseModel
|
|
|
|
| 3 |
|
| 4 |
app = FastAPI()
|
| 5 |
|
|
|
|
| 8 |
|
| 9 |
@app.get("/")
|
| 10 |
def home():
|
| 11 |
+
return {"message": "🚀 Feedback Chatbot API is live!"}
|
| 12 |
|
| 13 |
@app.post("/generate-response")
|
| 14 |
def generate_response(data: Question):
|
|
|
|
| 15 |
answer = f"Llama Response: {data.question_text}"
|
| 16 |
recommendation = "Recommendation: Reflect and take one positive step today."
|
|
|
|
| 17 |
return {
|
| 18 |
"answer": answer,
|
| 19 |
"recommendation": recommendation
|