Spaces:
Sleeping

faseehsandhu commited on
Commit
9b622e7
·
1 Parent(s): 58c949f

Add debug output to test file execution

Browse files
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -1,7 +1,10 @@
1
  """
2
  Main entry point for Hugging Face Spaces deployment.
3
- This file imports and runs the Streamlit app from the src directory.
4
  """
 
 
 
 
5
  import sys
6
  from pathlib import Path
7
 
@@ -9,14 +12,17 @@ from pathlib import Path
9
  src_path = Path(__file__).parent / "src"
10
  sys.path.insert(0, str(src_path))
11
 
 
 
 
12
  try:
13
- # Import the main module (avoid naming conflict with this file)
14
  import app as src_app
 
15
 
16
- # Run the main function (Streamlit executes the entire script)
17
  src_app.main()
18
  except Exception as e:
19
- import streamlit as st
20
  st.error(f"Error loading application: {e}")
21
  st.code(f"{type(e).__name__}: {e}")
22
  import traceback
 
1
  """
2
  Main entry point for Hugging Face Spaces deployment.
 
3
  """
4
+ import streamlit as st
5
+
6
+ st.write("## TEST: File is being executed!")
7
+
8
  import sys
9
  from pathlib import Path
10
 
 
12
  src_path = Path(__file__).parent / "src"
13
  sys.path.insert(0, str(src_path))
14
 
15
+ st.write(f"Source path: {src_path}")
16
+ st.write(f"Path exists: {src_path.exists()}")
17
+
18
  try:
19
+ # Import the main module
20
  import app as src_app
21
+ st.write("✅ Successfully imported src.app")
22
 
23
+ # Run the main function
24
  src_app.main()
25
  except Exception as e:
 
26
  st.error(f"Error loading application: {e}")
27
  st.code(f"{type(e).__name__}: {e}")
28
  import traceback