crisrm128 commited on
Commit
6b11518
·
1 Parent(s): 7c8dbd1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -9,9 +9,8 @@ app = FastAPI()
9
  pipe_flan = pipeline("text2text-generation", model="google/flan-t5-small")
10
 
11
  @app.get("/generate")
12
- def t5(input):
13
- output = pipe_flan(input)
14
- return {"output": output[0]["generated_text"]}
15
 
16
  #app.mount("/", StaticFiles(directory="static", html=True), name="static")
17
 
 
9
  pipe_flan = pipeline("text2text-generation", model="google/flan-t5-small")
10
 
11
  @app.get("/generate")
12
+ def generate(text: str):
13
+ return {"output": text}
 
14
 
15
  #app.mount("/", StaticFiles(directory="static", html=True), name="static")
16