Spaces:
Configuration error
Configuration error
from fastapi import FastAPI | |
from pydantic import BaseModel | |
import os | |
app = FastAPI() | |
async def root(): | |
return {"message": "Hello World"} | |
model = load_model() | |
client = MongoClient('mongodb://localhost:27017/') | |
db = client[''] | |
collection = db['text'] | |
class InputData(BaseModel): | |
title: str | |
keywords: str | |
subheadings: str | |
async def generate(input_data: InputData): | |
result = model.predict(input_data) | |
return {"result": "generated_output"} | |