ASesYusuf1 commited on
Commit
57c239a
·
verified ·
1 Parent(s): 9469b3c

Update processing.py

Browse files
Files changed (1) hide show
  1. processing.py +5 -0
processing.py CHANGED
@@ -6,6 +6,7 @@ import gc
6
  import shutil
7
  import sys
8
  from assets.i18n.i18n import I18nAuto
 
9
 
10
  i18n = I18nAuto()
11
  current_dir = os.path.dirname(os.path.abspath(__file__))
@@ -107,6 +108,7 @@ def extract_model_name_from_checkpoint(checkpoint_path):
107
  print(f"Original checkpoint path: {checkpoint_path}, extracted model_name: {model_name}")
108
  return model_name.strip()
109
 
 
110
  def run_command_and_process_files(
111
  model_type,
112
  config_path,
@@ -289,6 +291,7 @@ def run_command_and_process_files(
289
  traceback.print_exc()
290
  return (None,) * 14
291
 
 
292
  def process_audio(
293
  input_audio_file,
294
  model,
@@ -460,6 +463,7 @@ def process_audio(
460
  update_progress_html("Error occurred", 0)
461
  )
462
 
 
463
  def ensemble_audio_fn(files, method, weights, progress=gr.Progress()):
464
  try:
465
  if len(files) < 2:
@@ -512,6 +516,7 @@ def ensemble_audio_fn(files, method, weights, progress=gr.Progress()):
512
  progress(100, desc="Ensemble process completed")
513
 
514
 
 
515
  def auto_ensemble_process(
516
  auto_input_audio_file,
517
  selected_models,
 
6
  import shutil
7
  import sys
8
  from assets.i18n.i18n import I18nAuto
9
+ import spaces
10
 
11
  i18n = I18nAuto()
12
  current_dir = os.path.dirname(os.path.abspath(__file__))
 
108
  print(f"Original checkpoint path: {checkpoint_path}, extracted model_name: {model_name}")
109
  return model_name.strip()
110
 
111
+ @spaces.GPU
112
  def run_command_and_process_files(
113
  model_type,
114
  config_path,
 
291
  traceback.print_exc()
292
  return (None,) * 14
293
 
294
+ @spaces.GPU
295
  def process_audio(
296
  input_audio_file,
297
  model,
 
463
  update_progress_html("Error occurred", 0)
464
  )
465
 
466
+ @spaces.GPU
467
  def ensemble_audio_fn(files, method, weights, progress=gr.Progress()):
468
  try:
469
  if len(files) < 2:
 
516
  progress(100, desc="Ensemble process completed")
517
 
518
 
519
+ @spaces.GPU
520
  def auto_ensemble_process(
521
  auto_input_audio_file,
522
  selected_models,