shrut27 commited on
Commit
85c7668
·
verified ·
1 Parent(s): bcb2d6c

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -159,9 +159,9 @@ def render_overview_tab(df: pd.DataFrame, mb_df: pd.DataFrame) -> None:
159
 
160
  c3, c4 = st.columns(2)
161
  with c3:
162
- st.plotly_chart(ai_score_distribution(df), use_container_width=True)
163
  with c4:
164
- st.plotly_chart(mass_balance_sunburst(mb_df), use_container_width=True)
165
 
166
  st.subheader("PFAS Degradation Heatmap")
167
  st.plotly_chart(degradation_heatmap(df), use_container_width=True)
@@ -195,7 +195,7 @@ def render_ai_models_tab(df: pd.DataFrame, models: dict) -> None:
195
  preds = iso_model.predict(df[stability_cols])
196
  n_anomalies = int((preds == -1).sum())
197
  st.info(f"Isolation Forest detected **{n_anomalies}** potentially unstable experiments out of {len(df)}.")
198
- st.plotly_chart(stability_radar(df), use_container_width=True)
199
 
200
 
201
  def render_optimization_tab(df: pd.DataFrame) -> None:
@@ -251,7 +251,7 @@ def render_mass_balance_tab(df: pd.DataFrame, mb_df: pd.DataFrame) -> None:
251
  "+ Short-chain products + Mineralized PFAS`"
252
  )
253
 
254
- st.plotly_chart(mass_balance_sunburst(mb_df), use_container_width=True)
255
 
256
  st.subheader("Mass Balance Details")
257
  st.dataframe(
@@ -308,7 +308,7 @@ def render_reactor_stability_tab(df: pd.DataFrame) -> None:
308
  annotation_text="High VFA threshold")
309
  st.plotly_chart(fig_vfa, use_container_width=True)
310
 
311
- st.plotly_chart(stability_radar(df), use_container_width=True)
312
 
313
  st.subheader("Instability Detection Summary")
314
  stable = df[df["instability_flag"] == 0]
 
159
 
160
  c3, c4 = st.columns(2)
161
  with c3:
162
+ st.plotly_chart(ai_score_distribution(df), use_container_width=True, key="overview_ai_dist")
163
  with c4:
164
+ st.plotly_chart(mass_balance_sunburst(mb_df), use_container_width=True, key="overview_mass_balance")
165
 
166
  st.subheader("PFAS Degradation Heatmap")
167
  st.plotly_chart(degradation_heatmap(df), use_container_width=True)
 
195
  preds = iso_model.predict(df[stability_cols])
196
  n_anomalies = int((preds == -1).sum())
197
  st.info(f"Isolation Forest detected **{n_anomalies}** potentially unstable experiments out of {len(df)}.")
198
+ st.plotly_chart(stability_radar(df), use_container_width=True, key="models_stability_radar")
199
 
200
 
201
  def render_optimization_tab(df: pd.DataFrame) -> None:
 
251
  "+ Short-chain products + Mineralized PFAS`"
252
  )
253
 
254
+ st.plotly_chart(mass_balance_sunburst(mb_df), use_container_width=True, key="tab_mass_balance_sunburst")
255
 
256
  st.subheader("Mass Balance Details")
257
  st.dataframe(
 
308
  annotation_text="High VFA threshold")
309
  st.plotly_chart(fig_vfa, use_container_width=True)
310
 
311
+ st.plotly_chart(stability_radar(df), use_container_width=True, key="stability_tab_radar")
312
 
313
  st.subheader("Instability Detection Summary")
314
  stable = df[df["instability_flag"] == 0]