Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -174,13 +174,13 @@ with gr.Blocks(title="BPE Visualization Demo") as demo:
|
|
| 174 |
print("current_vis",len(current_vis))
|
| 175 |
print("current_bpe",len(current_bpe))
|
| 176 |
|
| 177 |
-
return image, current_vis[0],
|
| 178 |
|
| 179 |
|
| 180 |
run_btn.click(
|
| 181 |
on_run_clicked,
|
| 182 |
inputs=[model_type, image_input, text_input],
|
| 183 |
-
outputs=[orig_img, heatmap, bpe_display, prev_btn, next_btn
|
| 184 |
)
|
| 185 |
|
| 186 |
prev_btn.click(
|
|
|
|
| 174 |
print("current_vis",len(current_vis))
|
| 175 |
print("current_bpe",len(current_bpe))
|
| 176 |
|
| 177 |
+
return image, current_vis[0],f"Current BPE: {current_bpe[0]}", gr.update(visible=True), gr.update(visible=True)
|
| 178 |
|
| 179 |
|
| 180 |
run_btn.click(
|
| 181 |
on_run_clicked,
|
| 182 |
inputs=[model_type, image_input, text_input],
|
| 183 |
+
outputs=[orig_img, heatmap, bpe_display, prev_btn, next_btn], # 让它们显示
|
| 184 |
)
|
| 185 |
|
| 186 |
prev_btn.click(
|