Spaces:
Running
Running
from fastapi import FastAPI | |
from pydantic import BaseModel | |
app = FastAPI() | |
class Prompt(BaseModel): | |
text: str | |
async def chat(prompt: Prompt): | |
response = generate_response(prompt.text) | |
return {"response": response} | |