Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -207,7 +207,8 @@ with gr.Blocks(title="BPE Visualization Demo") as demo:
|
|
| 207 |
# inputs=index_slider,
|
| 208 |
# outputs=[heatmap, bpe_display]
|
| 209 |
# )
|
| 210 |
-
|
|
|
|
| 211 |
index_slider.change(
|
| 212 |
update_slider_index,
|
| 213 |
inputs=[index_slider,current_vis,current_bpe],
|
|
|
|
| 207 |
# inputs=index_slider,
|
| 208 |
# outputs=[heatmap, bpe_display]
|
| 209 |
# )
|
| 210 |
+
current_vis = gr.State(default=3) # 初始化状态
|
| 211 |
+
current_bpe = gr.State(default=['abc', 'eee', 'asx']) # 初始化状态
|
| 212 |
index_slider.change(
|
| 213 |
update_slider_index,
|
| 214 |
inputs=[index_slider,current_vis,current_bpe],
|