tomo2chin2 commited on
Commit
a39a185
·
verified ·
1 Parent(s): bd40890

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -583,7 +583,8 @@ with gr.Blocks(title="Full Page Screenshot (テキスト変換対応)", theme=gr
583
 
584
  # 入力モード変更時のイベント処理(テキストモード時のみ温度スライダーを表示)
585
  def update_temperature_visibility(mode):
586
- return gr.Slider.update(visible=(mode == "テキスト入力"))
 
587
 
588
  input_mode.change(
589
  fn=update_temperature_visibility,
 
583
 
584
  # 入力モード変更時のイベント処理(テキストモード時のみ温度スライダーを表示)
585
  def update_temperature_visibility(mode):
586
+ # Gradio 4.x用のアップデート方法に修正
587
+ return {"visible": mode == "テキスト入力", "__type__": "update"}
588
 
589
  input_mode.change(
590
  fn=update_temperature_visibility,