Spaces:
Sleeping
Sleeping
valentin urena
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -81,13 +81,6 @@ chat_interface = gr.ChatInterface(
|
|
81 |
)
|
82 |
|
83 |
|
84 |
-
def display_text(seq):
|
85 |
-
# Function to display some predefined text
|
86 |
-
# seq = play_match.get_move_logs()
|
87 |
-
seq = ['e4','e5']
|
88 |
-
for move in seq:
|
89 |
-
yield move
|
90 |
-
time.sleep(2)
|
91 |
|
92 |
with gr.Blocks(fill_height=True) as demo:
|
93 |
gr.Markdown(DESCRIPTION)
|
@@ -100,13 +93,13 @@ with gr.Blocks(fill_height=True) as demo:
|
|
100 |
with gr.Column():
|
101 |
chat_interface.render()
|
102 |
|
103 |
-
|
104 |
|
105 |
move_input = gr.Textbox(label="Enter your move in algebraic notation (e.g., e4, Nf3, Bxc4)")
|
106 |
btn = gr.Button("Submit Move")
|
107 |
-
btn.click(play_match.generate_moves, inputs=move_input, outputs=board_image)
|
108 |
|
109 |
-
btn.click(display_text, inputs=play_match.get_move_logs, outputs=text_output)
|
110 |
|
111 |
|
112 |
reset_btn = gr.Button("Reset Game")
|
|
|
81 |
)
|
82 |
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
with gr.Blocks(fill_height=True) as demo:
|
86 |
gr.Markdown(DESCRIPTION)
|
|
|
93 |
with gr.Column():
|
94 |
chat_interface.render()
|
95 |
|
96 |
+
game_logs = gr.Label(label="Display Text for Logs")
|
97 |
|
98 |
move_input = gr.Textbox(label="Enter your move in algebraic notation (e.g., e4, Nf3, Bxc4)")
|
99 |
btn = gr.Button("Submit Move")
|
100 |
+
btn.click(play_match.generate_moves, inputs=move_input, outputs=[board_image, game_logs])
|
101 |
|
102 |
+
# btn.click(display_text, inputs=play_match.get_move_logs, outputs=text_output)
|
103 |
|
104 |
|
105 |
reset_btn = gr.Button("Reset Game")
|