varshakolanu commited on
Commit
896c289
·
verified ·
1 Parent(s): 110ee23

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from fastapi import FastAPI, Request, Form
2
  from fastapi.responses import HTMLResponse
3
  from transformers import pipeline
4
  import uvicorn
@@ -303,6 +303,15 @@ async def main():
303
  </script>
304
  </body>
305
  </html>
 
306
 
307
 
 
 
 
 
 
 
308
 
 
 
 
1
+ from fastapi import FastAPI, Request
2
  from fastapi.responses import HTMLResponse
3
  from transformers import pipeline
4
  import uvicorn
 
303
  </script>
304
  </body>
305
  </html>
306
+ """
307
 
308
 
309
+ @app.get("/")
310
+ async def main():
311
+ """
312
+ Root endpoint to display a user-friendly HTML form for testing.
313
+ """
314
+ return HTMLResponse(content=html_content)
315
 
316
+ if __name__ == "__main__":
317
+ uvicorn.run(app, host="0.0.0.0", port=7860)