sdk1 / main.py
sth4nth's picture
Update main.py
e799e02 verified
raw
history blame
No virus
228 Bytes
from transformers import pipeline
pipe_flan = pipeline("text2text-generation", model="google/flan-t5-small")
@app.get("/infer_t5")
def t5(input):
output = pipe_flan(input)
return {"output": output[0]["generated_text"]}