Spaces:
Build error
Build error
from fastapi import FastAPI | |
from app.rag import generate_response | |
from app.classification import classify_text | |
app = FastAPI() | |
async def rag_endpoint(prompt: str): | |
response = generate_response(prompt) | |
return {"response": response} | |
async def classification_endpoint(text: str): | |
category = classify_text(text) | |
return {"category": category} | |