Spaces:
Runtime error
Runtime error
Update app.py
Browse files12343456971189101110 unmodified lines2223242829from fastapi import FastAPIfrom transformers import pipelinefrom huggingface_hub import login
## create a new FASTAPI app instanceapp=FastAPI()
# Initialize the text generation pipelinepipe = pipeline("text-generation", model="google/flan-t5-small")pipe = pipeline("text2text-generation", model="google/flan-t5-small")
@app.get("/")10 unmodified lines
## return the generate text in Json reposne return {"output":output[0]['generated_text']}
app.py+1-6