Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -223,7 +223,8 @@ with gr.Blocks() as demo:
|
|
223 |
inputs=[btn, chatbot, user, quiz_count, generation, poke_types],
|
224 |
outputs=[play, chatbot, leader_board, button1, button2, button3, button4])
|
225 |
|
226 |
-
def update_table(
|
|
|
227 |
global USERS
|
228 |
if user not in USERS:
|
229 |
USERS += [user]
|
@@ -244,15 +245,15 @@ with gr.Blocks() as demo:
|
|
244 |
return new_dropdown, btn, md, gr.Dropdown(USERS, value=user, label="์ฌ์ฉ์", info="๋น์ ์ ๋๊ตฌ์ ๊ฐ์?", allow_custom_value=True), infos[user].history, *random_buttons
|
245 |
|
246 |
user.blur(update_table,
|
247 |
-
inputs=
|
248 |
-
outputs=[
|
249 |
user.select(update_table,
|
250 |
-
inputs=
|
251 |
-
outputs=[
|
252 |
|
253 |
demo.load(update_table,
|
254 |
-
inputs=
|
255 |
-
outputs=[
|
256 |
|
257 |
demo.queue(concurrency_count=3)
|
258 |
demo.launch()
|
|
|
223 |
inputs=[btn, chatbot, user, quiz_count, generation, poke_types],
|
224 |
outputs=[play, chatbot, leader_board, button1, button2, button3, button4])
|
225 |
|
226 |
+
def update_table(profile: Optional[gr.OAuthProfile]):
|
227 |
+
user = profile.name
|
228 |
global USERS
|
229 |
if user not in USERS:
|
230 |
USERS += [user]
|
|
|
245 |
return new_dropdown, btn, md, gr.Dropdown(USERS, value=user, label="์ฌ์ฉ์", info="๋น์ ์ ๋๊ตฌ์ ๊ฐ์?", allow_custom_value=True), infos[user].history, *random_buttons
|
246 |
|
247 |
user.blur(update_table,
|
248 |
+
inputs=None,
|
249 |
+
outputs=[play, leader_board, user, chatbot, button1, button2, button3, button4])
|
250 |
user.select(update_table,
|
251 |
+
inputs=None,
|
252 |
+
outputs=[play, leader_board, user, chatbot, button1, button2, button3, button4])
|
253 |
|
254 |
demo.load(update_table,
|
255 |
+
inputs=None,
|
256 |
+
outputs=[play, leader_board, user, chatbot, button1, button2, button3, button4])
|
257 |
|
258 |
demo.queue(concurrency_count=3)
|
259 |
demo.launch()
|