Peter Michael Gits
Add CLAUDE.md documentation and update version to 0.1.1
450ae85
raw
history blame contribute delete
339 Bytes
from fastapi import FastAPI
from transformers import pipeline
app = FastAPI()
pipe_flan = pipeline("text2text-generation", model="google/flan-t5-small")
@app.get("/")
def greet_json():
return {"Hello": "World!"}
@app.get("/infer_t5")
def t5(input):
output = pipe_flan(input)
return {"output": output[0]["generated_text"]}