Spaces:
Sleeping
Sleeping
from fastapi import FastAPI | |
from pydantic import BaseModel | |
app = FastAPI(title="SAM_MedTesting") | |
class GenerationRequest(BaseModel): | |
prompt: str | |
max_new_tokens: int = 50 | |
class GenerationResponse(BaseModel): | |
generated_text: str | |
def generate(req: GenerationRequest): | |
out = f"hello world: {req}" | |
return out | |
def health(): | |
return {"status": "ok"} | |