aaron-official commited on
Commit
9094a0e
·
verified ·
1 Parent(s): 9486cb9

Update app_py.py

Browse files
Files changed (1) hide show
  1. app_py.py +14 -8
app_py.py CHANGED
@@ -1,8 +1,14 @@
1
- # app.py - Entry point for Hugging Face Spaces
2
- # This file is required and must be named app.py for HF Spaces
3
-
4
- # Import your main script
5
- from ocs4dev import main
6
-
7
- if __name__ == "__main__":
8
- main()
 
 
 
 
 
 
 
1
+ # app.py - Entry point for Hugging Face Spaces
2
+ # This file is required and must be named app.py for HF Spaces
3
+
4
+ # Import your main script
5
+ from ocs4dev import create_demo # Make sure this function exists and returns a gr.Blocks object
6
+
7
+ if __name__ == "__main__":
8
+ # Create and launch the demo
9
+ demo = create_demo()
10
+ demo.launch()
11
+
12
+ # For HF Spaces, also define at module level
13
+ demo = create_demo()
14
+ demo.launch()