skylord commited on
Commit
7f08352
·
verified ·
1 Parent(s): 607988f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -1,5 +1,6 @@
1
  from fastapi import FastAPI
2
  import gradio as gr
 
3
 
4
  from transformers import pipeline
5
  from gradio.components import Textbox
@@ -35,5 +36,9 @@ async def root():
35
  return text_input.launch(share=True, host="0.0.0.0", port=8000)
36
 
37
  # Launch the interface
38
- app = gr.mount_gradio_app(app, text_input, path="/")
 
 
 
 
39
  # iface.launch(port=8000)
 
1
  from fastapi import FastAPI
2
  import gradio as gr
3
+ import uvicorn
4
 
5
  from transformers import pipeline
6
  from gradio.components import Textbox
 
36
  return text_input.launch(share=True, host="0.0.0.0", port=8000)
37
 
38
  # Launch the interface
39
+ #app = gr.mount_gradio_app(app, text_input, path="/")
40
+
41
+ if __name__== "__main__":
42
+ uvicorn.run(app, host="0.0.0.0", port=8000)
43
+
44
  # iface.launch(port=8000)