Spaces:
Sleeping
Sleeping
Empereur-Pirate
commited on
Commit
•
d8a1f28
1
Parent(s):
d9ef17e
Update main.py
Browse files
main.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
from fastapi import FastAPI,
|
2 |
-
from transformers import pipeline
|
3 |
from fastapi.staticfiles import StaticFiles
|
|
|
4 |
|
5 |
app = FastAPI()
|
6 |
|
@@ -23,7 +23,6 @@ def infer_endpoint(data: dict):
|
|
23 |
result = t5(input_text)
|
24 |
return result
|
25 |
|
26 |
-
# Route to render and present the index.html file
|
27 |
@app.get("/", response_class=Response)
|
28 |
async def index():
|
29 |
return app.FileResponse("./static/index.html")
|
|
|
1 |
+
from fastapi import FastAPI, Response
|
|
|
2 |
from fastapi.staticfiles import StaticFiles
|
3 |
+
from transformers import pipeline
|
4 |
|
5 |
app = FastAPI()
|
6 |
|
|
|
23 |
result = t5(input_text)
|
24 |
return result
|
25 |
|
|
|
26 |
@app.get("/", response_class=Response)
|
27 |
async def index():
|
28 |
return app.FileResponse("./static/index.html")
|