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