Spaces:
Running
Running
Update app.py
Browse files
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 |
-
#
|
| 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 |
-
#
|
| 696 |
-
demo.load(fn=get_ui_data, outputs=[total_box, queue_box, commit_box, table_output]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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() をチェーンさせて起動
|