File size: 1,149 Bytes
7f5c4ef
 
a4970d3
7f5c4ef
 
a4970d3
7f5c4ef
 
 
 
 
 
 
 
 
 
 
 
6a013c7
 
 
 
 
7f5c4ef
6a013c7
 
7f5c4ef
6a013c7
 
 
7f5c4ef
6a013c7
 
7f5c4ef
 
 
 
 
b09b277
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""
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)