Spaces:
Runtime error
Runtime error
alperugurcan
commited on
Commit
•
5c2bd98
1
Parent(s):
49bca44
Update app.py
Browse files
app.py
CHANGED
@@ -103,9 +103,12 @@ css = """
|
|
103 |
height: 40px;
|
104 |
vertical-align: middle;
|
105 |
}
|
106 |
-
.button-
|
107 |
max-width: 400px;
|
108 |
margin: 0 auto 20px auto;
|
|
|
|
|
|
|
109 |
display: flex;
|
110 |
justify-content: space-between;
|
111 |
gap: 10px;
|
@@ -124,7 +127,8 @@ def create_ui():
|
|
124 |
|
125 |
state = gr.State({"game_over": False})
|
126 |
|
127 |
-
|
|
|
128 |
with gr.Row(elem_classes="button-row"):
|
129 |
buttons = [gr.Button(str(i), size="sm") for i in range(BOARD_SIZE[1])]
|
130 |
|
@@ -137,8 +141,7 @@ def create_ui():
|
|
137 |
elem_id="board",
|
138 |
row_count=BOARD_SIZE[0],
|
139 |
col_count=BOARD_SIZE[1],
|
140 |
-
max_rows=BOARD_SIZE[0]
|
141 |
-
height=300
|
142 |
)
|
143 |
|
144 |
message = gr.Textbox(value="Your turn!", label="Status")
|
|
|
103 |
height: 40px;
|
104 |
vertical-align: middle;
|
105 |
}
|
106 |
+
.button-container {
|
107 |
max-width: 400px;
|
108 |
margin: 0 auto 20px auto;
|
109 |
+
padding: 10px;
|
110 |
+
}
|
111 |
+
.button-row {
|
112 |
display: flex;
|
113 |
justify-content: space-between;
|
114 |
gap: 10px;
|
|
|
127 |
|
128 |
state = gr.State({"game_over": False})
|
129 |
|
130 |
+
# Simplified button container
|
131 |
+
with gr.Row(elem_classes="button-container"):
|
132 |
with gr.Row(elem_classes="button-row"):
|
133 |
buttons = [gr.Button(str(i), size="sm") for i in range(BOARD_SIZE[1])]
|
134 |
|
|
|
141 |
elem_id="board",
|
142 |
row_count=BOARD_SIZE[0],
|
143 |
col_count=BOARD_SIZE[1],
|
144 |
+
max_rows=BOARD_SIZE[0]
|
|
|
145 |
)
|
146 |
|
147 |
message = gr.Textbox(value="Your turn!", label="Status")
|