Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -4,12 +4,12 @@ from app.classification import classify_text
|
|
4 |
|
5 |
app = FastAPI()
|
6 |
|
7 |
-
@
|
8 |
async def rag_endpoint(prompt: str):
|
9 |
response = generate_response(prompt)
|
10 |
return {"response": response}
|
11 |
|
12 |
-
@
|
13 |
async def classification_endpoint(text: str):
|
14 |
category = classify_text(text)
|
15 |
return {"category": category}
|
|
|
4 |
|
5 |
app = FastAPI()
|
6 |
|
7 |
+
@post("/rag")
|
8 |
async def rag_endpoint(prompt: str):
|
9 |
response = generate_response(prompt)
|
10 |
return {"response": response}
|
11 |
|
12 |
+
@post("/classification")
|
13 |
async def classification_endpoint(text: str):
|
14 |
category = classify_text(text)
|
15 |
return {"category": category}
|