Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -229,7 +229,6 @@ with gr.Blocks() as demo:
|
|
229 |
if user not in USERS:
|
230 |
USERS += [user]
|
231 |
infos[user] = Info(name=user)
|
232 |
-
new_dropdown = gr.Dropdown(sorted(USERS), value=user, label="์ฌ์ฉ์", info="๋น์ ์ ๋๊ตฌ์ ๊ฐ์?", allow_custom_value=True)
|
233 |
leader_board = sorted(infos.items(), key=lambda x: (x[1].best_score, -x[1].best_time), reverse=True)
|
234 |
lbdf = pd.DataFrame([dict(**a[1].model_dump()) for a in leader_board])
|
235 |
lbdf.rename(columns={'name': "์ด๋ฆ", 'best_score': "์ต๊ณ ์ ์", 'best_time': "์๊ฐ๊ธฐ๋ก", 'comment': "ํด์ฆ์ ํ"}, inplace=True)
|
@@ -242,7 +241,7 @@ with gr.Blocks() as demo:
|
|
242 |
btn = gr.Button(value="ํฌ๊ธฐํ๊ธฐ", label="ํด์ฆ ์ค๋จ")
|
243 |
|
244 |
random_buttons = [gr.Button(value=c) for c in infos[user].candidates]
|
245 |
-
return new_dropdown, btn, md,
|
246 |
|
247 |
demo.load(update_table,
|
248 |
inputs=None,
|
|
|
229 |
if user not in USERS:
|
230 |
USERS += [user]
|
231 |
infos[user] = Info(name=user)
|
|
|
232 |
leader_board = sorted(infos.items(), key=lambda x: (x[1].best_score, -x[1].best_time), reverse=True)
|
233 |
lbdf = pd.DataFrame([dict(**a[1].model_dump()) for a in leader_board])
|
234 |
lbdf.rename(columns={'name': "์ด๋ฆ", 'best_score': "์ต๊ณ ์ ์", 'best_time': "์๊ฐ๊ธฐ๋ก", 'comment': "ํด์ฆ์ ํ"}, inplace=True)
|
|
|
241 |
btn = gr.Button(value="ํฌ๊ธฐํ๊ธฐ", label="ํด์ฆ ์ค๋จ")
|
242 |
|
243 |
random_buttons = [gr.Button(value=c) for c in infos[user].candidates]
|
244 |
+
return new_dropdown, btn, md, infos[user].history, *random_buttons
|
245 |
|
246 |
demo.load(update_table,
|
247 |
inputs=None,
|