Spaces:
Sleeping
Sleeping
valentin urena
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ import spaces
|
|
8 |
import torch
|
9 |
|
10 |
from typing import Iterator
|
11 |
-
|
12 |
|
13 |
from chess_board import Game
|
14 |
|
@@ -84,8 +84,10 @@ chat_interface = gr.ChatInterface(
|
|
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 |
|
90 |
with gr.Blocks(fill_height=True) as demo:
|
91 |
gr.Markdown(DESCRIPTION)
|
@@ -104,7 +106,7 @@ with gr.Blocks(fill_height=True) as demo:
|
|
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
|
108 |
|
109 |
|
110 |
reset_btn = gr.Button("Reset Game")
|
|
|
8 |
import torch
|
9 |
|
10 |
from typing import Iterator
|
11 |
+
import time
|
12 |
|
13 |
from chess_board import Game
|
14 |
|
|
|
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)
|
|
|
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")
|