Vrda commited on
Commit
14c06cc
·
verified ·
1 Parent(s): 60d5144

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -276,7 +276,6 @@ if "session_key" not in st.session_state:
276
  cleanup_deepseek_jobs()
277
 
278
 
279
- @st.fragment(run_every=5)
280
  def poll_deepseek_job():
281
  job_id = st.session_state.deepseek_job_id
282
  if not job_id or st.session_state.model_a_result is not None:
@@ -291,7 +290,6 @@ def poll_deepseek_job():
291
  st.session_state.total_elapsed = round(
292
  time.time() - st.session_state.analysis_started_at, 2
293
  )
294
- st.rerun()
295
 
296
 
297
  def load_sample():
@@ -469,7 +467,7 @@ if has_any_result:
469
  st.info(
470
  f"GPT-OSS-120B ready ({st.session_state.model_b_result.latency_seconds}s). "
471
  "DeepSeek Reasoner is still thinking — review and rate GPT-OSS results below. "
472
- "The page will auto-update when DeepSeek finishes."
473
  )
474
 
475
  with st.expander("English Translation"):
@@ -512,7 +510,8 @@ if has_any_result:
512
  "</div>",
513
  unsafe_allow_html=True,
514
  )
515
- st.caption("Checking DeepSeek status every 5 seconds.")
 
516
 
517
  # -----------------------------------------------------------------
518
  # Feedback
@@ -599,7 +598,7 @@ if has_any_result:
599
  if not both_ready:
600
  st.warning(
601
  "DeepSeek Reasoner has not finished yet. You can submit partial feedback now "
602
- "(GPT-OSS only) or wait the page will auto-refresh when DeepSeek is ready."
603
  )
604
 
605
  # Missed errors
 
276
  cleanup_deepseek_jobs()
277
 
278
 
 
279
  def poll_deepseek_job():
280
  job_id = st.session_state.deepseek_job_id
281
  if not job_id or st.session_state.model_a_result is not None:
 
290
  st.session_state.total_elapsed = round(
291
  time.time() - st.session_state.analysis_started_at, 2
292
  )
 
293
 
294
 
295
  def load_sample():
 
467
  st.info(
468
  f"GPT-OSS-120B ready ({st.session_state.model_b_result.latency_seconds}s). "
469
  "DeepSeek Reasoner is still thinking — review and rate GPT-OSS results below. "
470
+ "Click `Refresh DeepSeek status` below when you want to check if it has finished."
471
  )
472
 
473
  with st.expander("English Translation"):
 
510
  "</div>",
511
  unsafe_allow_html=True,
512
  )
513
+ if st.button("Refresh DeepSeek status", key="refresh_deepseek_status"):
514
+ st.rerun()
515
 
516
  # -----------------------------------------------------------------
517
  # Feedback
 
598
  if not both_ready:
599
  st.warning(
600
  "DeepSeek Reasoner has not finished yet. You can submit partial feedback now "
601
+ "(GPT-OSS only), or refresh once later to load the DeepSeek result."
602
  )
603
 
604
  # Missed errors