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