Arafath10 commited on
Commit
0b8107d
1 Parent(s): 9b752bf

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +9 -0
main.py CHANGED
@@ -3,6 +3,15 @@ from fastapi.responses import StreamingResponse
3
  import os
4
  import io
5
 
 
 
 
 
 
 
 
 
 
6
  temp = open("model/t.txt","r")
7
 
8
  app = FastAPI()
 
3
  import os
4
  import io
5
 
6
+ from transformers import pipeline
7
+
8
+
9
+ pipe_flan = pipeline("text2text-generation", model="google/flan-t5-small")
10
+
11
+
12
+ output = pipe_flan("hi")
13
+ print(output[0]["generated_text"])
14
+
15
  temp = open("model/t.txt","r")
16
 
17
  app = FastAPI()