Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,8 +3,12 @@ import numpy as np
|
|
| 3 |
import plotly.graph_objects as go
|
| 4 |
from plotly.subplots import make_subplots
|
| 5 |
from scipy.integrate import quad
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
#root, .gradio-container {
|
| 9 |
max-width: 100% !important;
|
| 10 |
}
|
|
@@ -25,7 +29,7 @@ gr.CSS
|
|
| 25 |
.gradio-container .gr-panel {
|
| 26 |
width: 100% !important;
|
| 27 |
}
|
| 28 |
-
"""
|
| 29 |
|
| 30 |
# ============================================================
|
| 31 |
# RFT MASTER PARAMETERS (UNTOUCHED)
|
|
@@ -118,6 +122,7 @@ def rft_rcqm_unification_lab(p1_early_input, p2_early_input, nex_coupling_input)
|
|
| 118 |
template='plotly_dark',
|
| 119 |
showlegend=False,
|
| 120 |
height=800,
|
|
|
|
| 121 |
title_text=f'RFT Unified Frame Lab — Age at z=13.67: {age_z13:.2f} Myr'
|
| 122 |
)
|
| 123 |
|
|
@@ -168,6 +173,7 @@ def solar1_verified():
|
|
| 168 |
fig.update_layout(
|
| 169 |
template='plotly_dark',
|
| 170 |
height=800,
|
|
|
|
| 171 |
title="Verified Solar1 Manifold (Preset)",
|
| 172 |
scene=dict(
|
| 173 |
xaxis_title="X (Solar1 Units)",
|
|
@@ -234,6 +240,7 @@ def solar1_dynamic(n_points, z_min, z_max, scatter, scale, mode):
|
|
| 234 |
fig.update_layout(
|
| 235 |
template='plotly_dark',
|
| 236 |
height=800,
|
|
|
|
| 237 |
title="Dynamic Solar1 Manifold (Exploratory Mode)",
|
| 238 |
scene=dict(
|
| 239 |
xaxis_title="X (Solar1 Units)",
|
|
@@ -296,7 +303,8 @@ solar1_tab = gr.TabbedInterface(
|
|
| 296 |
|
| 297 |
demo = gr.TabbedInterface(
|
| 298 |
[rft_tab, solar1_tab],
|
| 299 |
-
["RFT Expansion Lab", "Solar1 Manifold Explorer"]
|
|
|
|
| 300 |
)
|
| 301 |
|
| 302 |
if __name__ == "__main__":
|
|
|
|
| 3 |
import plotly.graph_objects as go
|
| 4 |
from plotly.subplots import make_subplots
|
| 5 |
from scipy.integrate import quad
|
| 6 |
+
|
| 7 |
+
# ============================================================
|
| 8 |
+
# CUSTOM CSS FOR FULL-WIDTH PLOTS (GRADIO v4 COMPATIBLE)
|
| 9 |
+
# ============================================================
|
| 10 |
+
|
| 11 |
+
custom_css = """
|
| 12 |
#root, .gradio-container {
|
| 13 |
max-width: 100% !important;
|
| 14 |
}
|
|
|
|
| 29 |
.gradio-container .gr-panel {
|
| 30 |
width: 100% !important;
|
| 31 |
}
|
| 32 |
+
"""
|
| 33 |
|
| 34 |
# ============================================================
|
| 35 |
# RFT MASTER PARAMETERS (UNTOUCHED)
|
|
|
|
| 122 |
template='plotly_dark',
|
| 123 |
showlegend=False,
|
| 124 |
height=800,
|
| 125 |
+
margin=dict(l=0, r=0, t=60, b=0),
|
| 126 |
title_text=f'RFT Unified Frame Lab — Age at z=13.67: {age_z13:.2f} Myr'
|
| 127 |
)
|
| 128 |
|
|
|
|
| 173 |
fig.update_layout(
|
| 174 |
template='plotly_dark',
|
| 175 |
height=800,
|
| 176 |
+
margin=dict(l=0, r=0, t=60, b=0),
|
| 177 |
title="Verified Solar1 Manifold (Preset)",
|
| 178 |
scene=dict(
|
| 179 |
xaxis_title="X (Solar1 Units)",
|
|
|
|
| 240 |
fig.update_layout(
|
| 241 |
template='plotly_dark',
|
| 242 |
height=800,
|
| 243 |
+
margin=dict(l=0, r=0, t=60, b=0),
|
| 244 |
title="Dynamic Solar1 Manifold (Exploratory Mode)",
|
| 245 |
scene=dict(
|
| 246 |
xaxis_title="X (Solar1 Units)",
|
|
|
|
| 303 |
|
| 304 |
demo = gr.TabbedInterface(
|
| 305 |
[rft_tab, solar1_tab],
|
| 306 |
+
["RFT Expansion Lab", "Solar1 Manifold Explorer"],
|
| 307 |
+
css=custom_css
|
| 308 |
)
|
| 309 |
|
| 310 |
if __name__ == "__main__":
|