IDKHowToCodeFr commited on
Commit
24fe97d
·
verified ·
1 Parent(s): 0d9e86e

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. app.py +20 -0
  2. requirements.txt +2 -0
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import subprocess
2
+ import os
3
+ import sys
4
+ import time
5
+
6
+ # 1. Start FastAPI backend in background
7
+ print("Starting FastAPI backend...")
8
+ backend_process = subprocess.Popen(
9
+ [sys.executable, "-m", "uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000"]
10
+ )
11
+
12
+ # Give backend some time to start
13
+ time.sleep(5)
14
+
15
+ # 2. Start Streamlit frontend
16
+ print("Starting Streamlit frontend...")
17
+ os.environ["API_URL"] = "http://localhost:8000"
18
+ subprocess.run(
19
+ ["streamlit", "run", "frontend/Home.py", "--server.port", "7860", "--server.address", "0.0.0.0"]
20
+ )
requirements.txt CHANGED
@@ -9,3 +9,5 @@ joblib>=1.4.2
9
  streamlit>=1.36.0
10
  plotly>=5.22.0
11
  requests>=2.32.3
 
 
 
9
  streamlit>=1.36.0
10
  plotly>=5.22.0
11
  requests>=2.32.3
12
+ m2cgen
13
+ shap