diyclassics Claude Opus 4.8 (1M context) commited on
Commit
5a90b2a
·
1 Parent(s): 0456577

fix: render parse table with st.table (HF proxy blanks st.dataframe)

Browse files

The interactive st.dataframe grid produces data server-side (confirmed via
AppTest and the clean run log — no crash on Analyze) but its JS component
silently fails to paint behind HF Spaces' proxy, leaving the demo stuck on
the summary line. st.table is plain HTML and always renders.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. pages/1_parsing_demo.py +5 -1
pages/1_parsing_demo.py CHANGED
@@ -89,7 +89,11 @@ with tab1:
89
  df = analyze_text(text)
90
  sent_count = df["sent_id"].nunique()
91
  st.text(f"Analyzed {len(df)} tokens in {sent_count} sentences with {model_name} model.")
92
- st.dataframe(df, width=1200, hide_index=True)
 
 
 
 
93
 
94
  @st.cache_data
95
  def convert_df(df):
 
89
  df = analyze_text(text)
90
  sent_count = df["sent_id"].nunique()
91
  st.text(f"Analyzed {len(df)} tokens in {sent_count} sentences with {model_name} model.")
92
+ # Static HTML table (st.table) instead of the interactive st.dataframe:
93
+ # the dataframe's JS grid silently fails to paint behind HF Spaces'
94
+ # proxy (renders blank after the summary line), while a plain HTML
95
+ # table always renders. Index hidden for a clean CoNLL-U-style view.
96
+ st.table(df.style.hide(axis="index"))
97
 
98
  @st.cache_data
99
  def convert_df(df):