valentin urena commited on
Commit
0ee6f09
·
verified ·
1 Parent(s): 09e95ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -81,9 +81,9 @@ chat_interface = gr.ChatInterface(
81
  )
82
 
83
 
84
- def display_text():
85
  # Function to display some predefined text
86
- seq = play_match.get_move_logs()
87
  for move in seq:
88
  yield move
89
 
@@ -103,7 +103,8 @@ with gr.Blocks(fill_height=True) as demo:
103
  move_input = gr.Textbox(label="Enter your move in algebraic notation (e.g., e4, Nf3, Bxc4)")
104
  btn = gr.Button("Submit Move")
105
  btn.click(play_match.generate_moves, inputs=move_input, outputs=board_image)
106
- btn.click(display_text, outputs=text_output)
 
107
 
108
 
109
  reset_btn = gr.Button("Reset Game")
 
81
  )
82
 
83
 
84
+ def display_text(seq):
85
  # Function to display some predefined text
86
+ # seq = play_match.get_move_logs()
87
  for move in seq:
88
  yield move
89
 
 
103
  move_input = gr.Textbox(label="Enter your move in algebraic notation (e.g., e4, Nf3, Bxc4)")
104
  btn = gr.Button("Submit Move")
105
  btn.click(play_match.generate_moves, inputs=move_input, outputs=board_image)
106
+
107
+ btn.click(display_text, inputs=play_match.get_move_logs(), outputs=text_output)
108
 
109
 
110
  reset_btn = gr.Button("Reset Game")