GoutamSachdev commited on
Commit
fdd2c53
·
verified ·
1 Parent(s): 5604b2a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -19
app.py CHANGED
@@ -1,19 +1,19 @@
1
- from fastapi import FastAPI
2
- from transforms import pipeline
3
-
4
- app=FastAPI()
5
-
6
- pipe =pipeline("text2text-generation", model="google/flan-t5-small")
7
-
8
- @app.get("/")
9
- def home():
10
- return {"message","Hello Users"}
11
-
12
- @app.get("/asking")
13
-
14
- def generate(text:str):
15
- output=pipe(text)
16
-
17
- return {"output":output[0]['generated_text']}
18
-
19
-
 
1
+ from fastapi import FastAPI
2
+ from transformers import pipeline
3
+
4
+ app=FastAPI()
5
+
6
+ pipe =pipeline("text2text-generation", model="google/flan-t5-small")
7
+
8
+ @app.get("/")
9
+ def home():
10
+ return {"message","Hello Users"}
11
+
12
+ @app.get("/asking")
13
+
14
+ def generate(text:str):
15
+ output=pipe(text)
16
+
17
+ return {"output":output[0]['generated_text']}
18
+
19
+