|
54 | 54 | st.set_page_config(page_title="Glasgow Starplot Viewer", page_icon="🌌") |
55 | 55 | st.title("🌌 Glasgow Starplot Viewer") |
56 | 56 |
|
| 57 | +# Add a note about generation time |
| 58 | +st.info( |
| 59 | + "⚠️ Generating a chart can take up to **3 minutes** depending on your selections. " |
| 60 | + "Please be patient while the image is being created." |
| 61 | +) |
| 62 | + |
57 | 63 | # Sidebar: controls |
58 | 64 | plot_type = st.sidebar.radio("Select Plot Type", ["Horizon", "Zenith"]) |
59 | 65 | obs_date = st.sidebar.date_input("Date", value=date.today()) |
|
62 | 68 |
|
63 | 69 | # Extra option: fast vs HD |
64 | 70 | quality = st.sidebar.radio("Quality", ["Fast (preview)", "HD (slower)"]) |
65 | | -RESOLUTION = 1200 if quality == "Fast (preview)" else 2400 |
| 71 | +RESOLUTION = 600 if quality == "Fast (preview)" else 1200 |
66 | 72 |
|
67 | 73 | # Session state |
68 | 74 | if "chart_bytes" not in st.session_state: |
@@ -102,8 +108,7 @@ def generate_chart(plt_type: str, |
102 | 108 | tz = ZoneInfo("Europe/London") |
103 | 109 | dt = datetime.combine(obs_date, obs_time).replace(tzinfo=tz) |
104 | 110 |
|
105 | | - with st.spinner("Generating chart, please wait..."): |
106 | | - img_bytes = generate_chart(plot_type, dt, mag_limit, RESOLUTION) |
| 111 | + img_bytes = generate_chart(plot_type, dt, mag_limit, RESOLUTION) |
107 | 112 |
|
108 | 113 | st.session_state.chart_bytes = img_bytes |
109 | 114 | st.success("✅ Chart generated!") |
|
0 commit comments