Spaces:
Paused
Paused
| from fastapi import FastAPI | |
| from transformers import pipeline | |
| app = FastAPI() | |
| pipe_flan = pipeline("text2text-generation", model="google/flan-t5-small") | |
| def index(input): | |
| output = pipe_flan(input) | |
| return {"output": output[0]["generated_text"]} |