杨万青 commited on
Commit
e9cd2b4
·
1 Parent(s): aa640b6
Files changed (1) hide show
  1. main.py +8 -1
main.py CHANGED
@@ -13,4 +13,11 @@ def read_root():
13
  # def ffmpeg(input):
14
  # output = pipe_flan(input)
15
  # print(output)
16
- # return {"output": output[0]["generated_text"]}
 
 
 
 
 
 
 
 
13
  # def ffmpeg(input):
14
  # output = pipe_flan(input)
15
  # print(output)
16
+ # return {"output": output[0]["generated_text"]}
17
+
18
+ pipe_flan = pipeline("text2text-generation", model="google/flan-t5-small")
19
+
20
+ @app.get("/infer_t5")
21
+ def t5(input):
22
+ output = pipe_flan(input)
23
+ return {"output": output[0]["generated_text"]}