ysharma HF Staff commited on
Commit
1e52f07
·
1 Parent(s): c48b350

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +8 -1
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")