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) | |