yoon-gu commited on
Commit
05bfeec
โ€ข
1 Parent(s): d97e07f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
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, gr.Dropdown(USERS, value=user, label="์‚ฌ์šฉ์ž", info="๋‹น์‹ ์€ ๋ˆ„๊ตฌ์‹ ๊ฐ€์š”?", allow_custom_value=True), infos[user].history, *random_buttons
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,