Spaces:
Sleeping
Sleeping
import logging | |
from fastapi import FastAPI | |
from pydantic import BaseModel | |
logging.basicConfig() | |
logger = logging.getLogger(__name__) | |
logger.setLevel(logging.INFO) | |
class InputLoad(BaseModel): | |
question: str | |
class ResponseLoad(BaseModel): | |
answer: str | |
app = FastAPI() | |
def health_check(): | |
return {"server": "running"} | |
async def receive(input_load: InputLoad) -> ResponseLoad: | |
return ResponseLoad(answer="Hi, happy to help you with that. According to my information this is possible! Hope that was helpful!") | |