mickeyshi
commited on
Commit
•
ecb5798
1
Parent(s):
891bae9
changed task to trasnlation
Browse files
main.py
CHANGED
@@ -4,7 +4,7 @@ app = FastAPI()
|
|
4 |
|
5 |
from transformers import pipeline
|
6 |
|
7 |
-
pipe_flan = pipeline("
|
8 |
|
9 |
@app.get("/infer_t5")
|
10 |
def t5(input):
|
@@ -14,4 +14,5 @@ def t5(input):
|
|
14 |
app.mount("/", StaticFiles(directory="static", html=True), name="static")
|
15 |
@app.get("/")
|
16 |
def index() -> FileResponse:
|
17 |
-
return FileResponse(path="/app/static/index.html", html=True
|
|
|
|
4 |
|
5 |
from transformers import pipeline
|
6 |
|
7 |
+
pipe_flan = pipeline("translation", model="google/flan-t5-small")
|
8 |
|
9 |
@app.get("/infer_t5")
|
10 |
def t5(input):
|
|
|
14 |
app.mount("/", StaticFiles(directory="static", html=True), name="static")
|
15 |
@app.get("/")
|
16 |
def index() -> FileResponse:
|
17 |
+
return FileResponse(path="/app/static/index.html", html=True
|
18 |
+
)
|