rikunarita commited on
Commit
1dcbbe6
·
verified ·
1 Parent(s): 542d169

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -248,7 +248,7 @@ def clean_and_convert_html(html_content, url):
248
  tex = annotation.get_text().strip()
249
 
250
  if tex:
251
- # 【バグ修正】貪欲正規表現を廃止し、括弧のDepthネストカウントによって安全に最外周の \displaystyle のみを除去
252
  if tex.startswith(r'{\displaystyle') and tex.endswith('}'):
253
  depth = 0
254
  is_pure_envelope = True
@@ -692,8 +692,12 @@ with gr.Blocks(title="Wikinium-Maker Engine") as demo:
692
  gr.Markdown("### 📈 Dynamic Languages Tracking Performance Matrix")
693
  table_output = gr.HTML()
694
 
695
- # 互換性と高い堅牢性を担保するため、demo.loadevery引数を用いた組み込み更新処理に一本化
696
- demo.load(fn=get_ui_data, outputs=[total_box, queue_box, commit_box, table_output], every=2.0)
 
 
 
 
697
 
698
  if __name__ == "__main__":
699
  # every引数によるWeb UIの定周期自動リフレッシュを完全に動作させるため、明示的に queue() をチェーンさせて起動
 
248
  tex = annotation.get_text().strip()
249
 
250
  if tex:
251
+ # 括弧のDepthネストカウントによって安全に最外周の \displaystyle のみを除去
252
  if tex.startswith(r'{\displaystyle') and tex.endswith('}'):
253
  depth = 0
254
  is_pure_envelope = True
 
692
  gr.Markdown("### 📈 Dynamic Languages Tracking Performance Matrix")
693
  table_output = gr.HTML()
694
 
695
+ # 初回起動時データ読み込み処理
696
+ demo.load(fn=get_ui_data, outputs=[total_box, queue_box, commit_box, table_output])
697
+
698
+ # 2秒ごとの定周期自動リフレッシュ処理のためのタイマーを設定
699
+ timer = gr.Timer(2.0)
700
+ timer.tick(fn=get_ui_data, outputs=[total_box, queue_box, commit_box, table_output])
701
 
702
  if __name__ == "__main__":
703
  # every引数によるWeb UIの定周期自動リフレッシュを完全に動作させるため、明示的に queue() をチェーンさせて起動