litagin commited on
Commit
1373b65
·
1 Parent(s): c9faa9a

delete progress

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -176,7 +176,6 @@ with gr.Blocks(head=shortcut_js) as app:
176
  with gr.Row():
177
  with gr.Column():
178
  btn_init = gr.Button("読み込み")
179
- counter_info = gr.Textbox(label="進捗状況")
180
  with gr.Column(variant="panel"):
181
  key = gr.Textbox(label="Key")
182
  audio = gr.Audio(
@@ -198,14 +197,12 @@ with gr.Blocks(head=shortcut_js) as app:
198
  global current_item
199
  if current_item is None:
200
  current_item = get_next_parsed_item()
201
- counter_str = f"{current_item['counter']}/{NUM_SAMPLES}: {current_item['counter'] / NUM_SAMPLES * 100:.2f}%"
202
  return {
203
  key: current_item["key"],
204
  audio: gr.Audio(current_item["audio"], autoplay=True),
205
  text: current_item["text"],
206
  label: current_item["label"],
207
  label_id: current_item["label_id"],
208
- counter_info: counter_str,
209
  }
210
 
211
  def set_next_item(data: dict) -> dict:
@@ -231,13 +228,13 @@ with gr.Blocks(head=shortcut_js) as app:
231
 
232
  btn_init.click(
233
  update_current_item,
234
- outputs=[key, audio, text, label, label_id, counter_info],
235
  )
236
 
237
  btn_skip.click(
238
  put_unmodified,
239
  inputs={key, label_id},
240
- outputs=[key, audio, text, label, label_id, counter_info],
241
  )
242
 
243
  functions_list = []
@@ -264,7 +261,7 @@ with gr.Blocks(head=shortcut_js) as app:
264
  btn_list[_id].click(
265
  functions_list[_id],
266
  inputs={key},
267
- outputs=[key, audio, text, label, label_id, counter_info],
268
  )
269
 
270
  app.launch()
 
176
  with gr.Row():
177
  with gr.Column():
178
  btn_init = gr.Button("読み込み")
 
179
  with gr.Column(variant="panel"):
180
  key = gr.Textbox(label="Key")
181
  audio = gr.Audio(
 
197
  global current_item
198
  if current_item is None:
199
  current_item = get_next_parsed_item()
 
200
  return {
201
  key: current_item["key"],
202
  audio: gr.Audio(current_item["audio"], autoplay=True),
203
  text: current_item["text"],
204
  label: current_item["label"],
205
  label_id: current_item["label_id"],
 
206
  }
207
 
208
  def set_next_item(data: dict) -> dict:
 
228
 
229
  btn_init.click(
230
  update_current_item,
231
+ outputs=[key, audio, text, label, label_id],
232
  )
233
 
234
  btn_skip.click(
235
  put_unmodified,
236
  inputs={key, label_id},
237
+ outputs=[key, audio, text, label, label_id],
238
  )
239
 
240
  functions_list = []
 
261
  btn_list[_id].click(
262
  functions_list[_id],
263
  inputs={key},
264
+ outputs=[key, audio, text, label, label_id],
265
  )
266
 
267
  app.launch()