jacksonwambali commited on
Commit
f3d88d2
·
verified ·
1 Parent(s): 6eda912

Create main.py

Browse files
Files changed (1) hide show
  1. main.py +10 -0
main.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import threading
2
+ import uvicorn
3
+ from app import main as gradio_main
4
+
5
+ # Start Gradio app in the background
6
+ threading.Thread(target=gradio_main).start()
7
+
8
+ # Start FastAPI app (predict endpoint)
9
+ if __name__ == "__main__":
10
+ uvicorn.run("api:app", host="0.0.0.0", port=8000)