Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -12,4 +12,11 @@ pipe_flan = pipeline("text2text-generation", model="google/flan-t5-small")
|
|
| 12 |
@app.get("/infer_t5")
|
| 13 |
def t5(input):
|
| 14 |
output = pipe_flan(input)
|
| 15 |
-
return {"output": output[0]["generated_text"]}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
@app.get("/infer_t5")
|
| 13 |
def t5(input):
|
| 14 |
output = pipe_flan(input)
|
| 15 |
+
return {"output": output[0]["generated_text"]}
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
app.mount("/", StaticFiles(directory="static", html=True), name="static")
|
| 19 |
+
|
| 20 |
+
@app.get("/")
|
| 21 |
+
def index() -> FileResponse:
|
| 22 |
+
return FileResponse(path="/app/static/index.html", media_type="text/html")
|