Spaces:
Sleeping
Sleeping
remove main()?
Browse files- README.md +1 -1
- app.py +13 -20
- requirements.txt +1 -1
README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
---
|
| 2 |
title: waveOrder Phase Reconstruction Viewer
|
| 3 |
emoji: 🔬
|
| 4 |
-
python_version: 3.
|
| 5 |
colorFrom: blue
|
| 6 |
colorTo: purple
|
| 7 |
sdk: gradio
|
|
|
|
| 1 |
---
|
| 2 |
title: waveOrder Phase Reconstruction Viewer
|
| 3 |
emoji: 🔬
|
| 4 |
+
python_version: 3.13
|
| 5 |
colorFrom: blue
|
| 6 |
colorTo: purple
|
| 7 |
sdk: gradio
|
app.py
CHANGED
|
@@ -16,31 +16,24 @@ from optimize_demo import (
|
|
| 16 |
create_gradio_interface,
|
| 17 |
)
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
print("\n" + "=" * 60)
|
| 23 |
-
print("WaveOrder Phase Reconstruction Viewer")
|
| 24 |
-
print("=" * 60 + "\n")
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
data_xr, pixel_scales = load_default_fov(plate_metadata)
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
demo = create_gradio_interface(plate_metadata, default_fields, data_xr, pixel_scales)
|
| 34 |
-
|
| 35 |
-
# Launch application
|
| 36 |
print("\n" + "=" * 60)
|
| 37 |
print("Starting Gradio Phase Reconstruction Viewer")
|
| 38 |
print("=" * 60)
|
| 39 |
print("Open your browser to the URL shown below")
|
| 40 |
print("=" * 60 + "\n")
|
| 41 |
-
|
| 42 |
-
demo.launch() # HuggingFace Spaces handles server configuration automatically
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
if __name__ == "__main__":
|
| 46 |
-
main()
|
|
|
|
| 16 |
create_gradio_interface,
|
| 17 |
)
|
| 18 |
|
| 19 |
+
# Initialize application state
|
| 20 |
+
print("\n" + "=" * 60)
|
| 21 |
+
print("WaveOrder Phase Reconstruction Viewer")
|
| 22 |
+
print("=" * 60 + "\n")
|
| 23 |
+
print("Initializing application...")
|
| 24 |
|
| 25 |
+
plate_metadata, default_fields = initialize_plate_metadata()
|
| 26 |
+
data_xr, pixel_scales = load_default_fov(plate_metadata)
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
+
# Create Gradio interface (global 'demo' variable for HF Spaces)
|
| 29 |
+
print("\nBuilding user interface...")
|
| 30 |
+
demo = create_gradio_interface(plate_metadata, default_fields, data_xr, pixel_scales)
|
|
|
|
| 31 |
|
| 32 |
+
# Launch application (HF Spaces hot reload will use this)
|
| 33 |
+
if __name__ == "__main__":
|
|
|
|
|
|
|
|
|
|
| 34 |
print("\n" + "=" * 60)
|
| 35 |
print("Starting Gradio Phase Reconstruction Viewer")
|
| 36 |
print("=" * 60)
|
| 37 |
print("Open your browser to the URL shown below")
|
| 38 |
print("=" * 60 + "\n")
|
| 39 |
+
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
|
@@ -7,4 +7,4 @@ git+https://github.com/ianhi/xarray-ome.git@main
|
|
| 7 |
git+https://github.com/czbiohub-sf/iohub.git@v0.3.0a2
|
| 8 |
|
| 9 |
# Gradio for web interface
|
| 10 |
-
gradio>=6.0.
|
|
|
|
| 7 |
git+https://github.com/czbiohub-sf/iohub.git@v0.3.0a2
|
| 8 |
|
| 9 |
# Gradio for web interface
|
| 10 |
+
gradio>=6.0.2
|