Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -1,13 +1,11 @@
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
-
from
|
|
|
|
| 3 |
|
| 4 |
app = FastAPI()
|
| 5 |
-
pipe_flan = pipeline("text2text-generation", model="google/flan-t5-small")
|
| 6 |
-
|
| 7 |
-
#@app.get("/")
|
| 8 |
-
#def read_root():
|
| 9 |
-
# return {"Hello": "World!"}
|
| 10 |
|
|
|
|
|
|
|
| 11 |
|
| 12 |
@app.get("/infer_t5")
|
| 13 |
def t5(input):
|
|
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
+
from fastapi.staticfiles import StaticFiles
|
| 3 |
+
from fastapi.responses import FileResponse
|
| 4 |
|
| 5 |
app = FastAPI()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
from transformers import pipeline
|
| 8 |
+
pipe_flan = pipeline("text2text-generation", model="google/flan-t5-small")
|
| 9 |
|
| 10 |
@app.get("/infer_t5")
|
| 11 |
def t5(input):
|