Kryptone commited on
Commit
cf6afc4
·
verified ·
1 Parent(s): e662297

check changelog tab

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py CHANGED
@@ -223,6 +223,10 @@ def download_video_as_audio_only(yt_video, audio_output_format):
223
  os.remove(outputmp3removal)
224
  return "Done! Download the zip file below! This only contains the audio file.", single_zip_name
225
 
 
 
 
 
226
  with gr.Blocks(theme='sudeepshouche/minimalist', title="Global Dataset Maker") as app:
227
  gr.HTML(
228
  "<h1> Welcome to the GDMGS! (GlobalDatasetMaker Gradio Space) </h1>"
@@ -333,7 +337,20 @@ with gr.Blocks(theme='sudeepshouche/minimalist', title="Global Dataset Maker") a
333
  [yt_video, audio_output_format],
334
  [gr.Text(label="Output"), gr.File(label="Zipped audio file")]
335
  )
 
 
 
 
 
 
 
 
 
 
 
 
336
  with gr.TabItem("Changelog"):
 
337
  gr.Markdown("v0.95 - Fixed issue with mp3 files not downloading audio properly.")
338
  gr.Markdown("v0.94a - Fixed issue with existing output.wav or output.mp3 files clashing with the split audio files with addition of the new tool.")
339
  gr.Markdown("v0.94 - Added new tool: YouTube-to-audio.")
 
223
  os.remove(outputmp3removal)
224
  return "Done! Download the zip file below! This only contains the audio file.", single_zip_name
225
 
226
+ def check_for_remaining_wav_or_mp3_files(which_filetype):
227
+ audio_files = glob.glob(f"*.{which_filetype}")
228
+ return f"There are {len(audio_files)} leftover files."
229
+
230
  with gr.Blocks(theme='sudeepshouche/minimalist', title="Global Dataset Maker") as app:
231
  gr.HTML(
232
  "<h1> Welcome to the GDMGS! (GlobalDatasetMaker Gradio Space) </h1>"
 
337
  [yt_video, audio_output_format],
338
  [gr.Text(label="Output"), gr.File(label="Zipped audio file")]
339
  )
340
+ with gr.Tab("Check for leftover mp3 or wav files"):
341
+ gr.Markdown("There might be instances where sometimes a few wav or mp3 files are left over after a conversion. This section tells how many of those files are left, if any.")
342
+ with gr.Row():
343
+ with gr.Column():
344
+ with gr.Row():
345
+ which_filetype = gr.Radio(["wav", "mp3"], value="wav", label="Search for what filetype?")
346
+ checkbtn = gr.Button("Check for files", variant='primary')
347
+ checkbtn.click(
348
+ check_for_remaining_wav_or_mp3_files,
349
+ which_filetype,
350
+ gr.Text(label="Result")
351
+ )
352
  with gr.TabItem("Changelog"):
353
+ gr.Markdown("v0.96 - Added new remaining files tool in Misc Tools.")
354
  gr.Markdown("v0.95 - Fixed issue with mp3 files not downloading audio properly.")
355
  gr.Markdown("v0.94a - Fixed issue with existing output.wav or output.mp3 files clashing with the split audio files with addition of the new tool.")
356
  gr.Markdown("v0.94 - Added new tool: YouTube-to-audio.")