Spaces:
Sleeping
Sleeping
| """ | |
| WaveOrder Phase Reconstruction Viewer - Main Entry Point | |
| This is the main application entry point that launches the phase reconstruction | |
| viewer with interactive optimization capabilities. | |
| Usage: | |
| python app.py | |
| For more details, see optimize_demo.py | |
| """ | |
| from optimize_demo import ( | |
| initialize_plate_metadata, | |
| load_default_fov, | |
| create_gradio_interface, | |
| ) | |
| # Initialize application state | |
| print("\n" + "=" * 60) | |
| print("WaveOrder Phase Reconstruction Viewer") | |
| print("=" * 60 + "\n") | |
| print("Initializing application...") | |
| plate_metadata, default_fields = initialize_plate_metadata() | |
| data_xr, pixel_scales = load_default_fov(plate_metadata) | |
| # Create Gradio interface (global 'demo' variable for HF Spaces) | |
| print("\nBuilding user interface...") | |
| demo = create_gradio_interface(plate_metadata, default_fields, data_xr, pixel_scales) | |
| # Launch application (HF Spaces hot reload will use this) | |
| if __name__ == "__main__": | |
| print("\n" + "=" * 60) | |
| print("Starting Gradio Phase Reconstruction Viewer") | |
| print("=" * 60) | |
| print("Open your browser to the URL shown below") | |
| print("=" * 60 + "\n") | |
| demo.launch(ssr_mode=False) |