Spaces:
Sleeping
Sleeping
Update main.py
Browse files
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()
|