brichett commited on
Commit
0833ce0
·
verified ·
1 Parent(s): 578b48a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -5,13 +5,15 @@ import sys
5
  sys.path.append(os.path.join(os.path.dirname(__file__), 'src'))
6
 
7
  from src.gradio_server import app, iface_combined
 
 
8
 
9
  # Function to run FastAPI in a separate thread
10
  def run_fastapi():
11
  uvicorn.run(app, host="0.0.0.0", port=8000)
12
 
13
  # Start the FastAPI server in a separate thread
14
- fastapi_thread = threading.Thread(target=run_fastapi)
15
  fastapi_thread.start()
16
 
17
  # Launch the Gradio interface
 
5
  sys.path.append(os.path.join(os.path.dirname(__file__), 'src'))
6
 
7
  from src.gradio_server import app, iface_combined
8
+ import uvicorn
9
+ from threading import Thread
10
 
11
  # Function to run FastAPI in a separate thread
12
  def run_fastapi():
13
  uvicorn.run(app, host="0.0.0.0", port=8000)
14
 
15
  # Start the FastAPI server in a separate thread
16
+ fastapi_thread = Thread(target=run_fastapi)
17
  fastapi_thread.start()
18
 
19
  # Launch the Gradio interface