File size: 364 Bytes
6c90606
07f564a
 
 
 
 
6aa95f4
6c90606
07f564a
 
 
 
 
6c90606
07f564a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import uvicorn
from threading import Thread
from app.gradio_ui import create_ui

def start_gradio_ui():
    create_ui()

if __name__ == "__main__":
    # Start the Gradio UI in a separate thread
    ui_thread = Thread(target=start_gradio_ui)
    ui_thread.start()

    # Run the FastAPI app
    uvicorn.run("app.main:app", host="0.0.0.0", port=8000, reload=True)