Spaces:
Sleeping
Sleeping
from fastapi import FastAPI, File, UploadFile | |
from typing import List, Optional | |
import uvicorn | |
from pydantic import BaseModel | |
from uuid import uuid4 | |
# App definition | |
app = FastAPI() | |
# Base model | |
class Options(BaseModel): | |
request_id: str | |
async def _file_upload(request_id: str = str(uuid4()), files: List[UploadFile] = File(...)): | |
return {"request_id": request_id, "file_names": [file.filename for file in files]} |