Spaces:
Sleeping
Sleeping
Update app_py.py
Browse files
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
|
| 6 |
-
|
| 7 |
-
if __name__ == "__main__":
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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()
|