Spaces:
Sleeping
Sleeping
| from fastapi import FastAPI | |
| from transformers import pipeline | |
| pipe = pipeline("text2text-generation", model="google/flan-t5-base") | |
| app = FastAPI() | |
| def home(): | |
| return {"hello": "people"} | |
| def ask(prompt: str): | |
| result = pipe(prompt) | |
| return result[0] | |