Mattral commited on
Commit
a6259d7
·
verified ·
1 Parent(s): 9785644

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -1,8 +1,12 @@
1
  import os
2
- import subprocess
3
 
4
- # Path to FinalApp.py inside the 'app' folder
5
- final_app_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'app', 'FinalApp.py')
 
 
6
 
7
- # Run FinalApp.py directly
8
- subprocess.run(["streamlit", "run", final_app_path])
 
 
 
1
  import os
2
+ import sys
3
 
4
+ # Add the 'app' directory to sys.path
5
+ app_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'app')
6
+ if app_dir not in sys.path:
7
+ sys.path.append(app_dir)
8
 
9
+ # Import and run FinalApp.py
10
+ import FinalApp
11
+
12
+ FinalApp.main() # Call the main function directly if defined