jhj0517 commited on
Commit
31fd6fe
·
1 Parent(s): a06971f

move function location

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -60,21 +60,6 @@ class App:
60
  )
61
  return whisper_inf
62
 
63
- @staticmethod
64
- def open_folder(folder_path: str):
65
- if os.path.exists(folder_path):
66
- os.system(f"start {folder_path}")
67
- else:
68
- print(f"The folder {folder_path} does not exist.")
69
-
70
- @staticmethod
71
- def on_change_models(model_size: str):
72
- translatable_model = ["large", "large-v1", "large-v2", "large-v3"]
73
- if model_size not in translatable_model:
74
- return gr.Checkbox(visible=False, value=False, interactive=False)
75
- else:
76
- return gr.Checkbox(visible=True, value=False, label="Translate to English?", interactive=True)
77
-
78
  def launch(self):
79
  with self.app:
80
  with gr.Row():
@@ -618,6 +603,21 @@ class App:
618
 
619
  self.app.queue(api_open=False).launch(**launch_args)
620
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
621
 
622
  # Create the parser for command-line arguments
623
  parser = argparse.ArgumentParser()
 
60
  )
61
  return whisper_inf
62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  def launch(self):
64
  with self.app:
65
  with gr.Row():
 
603
 
604
  self.app.queue(api_open=False).launch(**launch_args)
605
 
606
+ @staticmethod
607
+ def open_folder(folder_path: str):
608
+ if os.path.exists(folder_path):
609
+ os.system(f"start {folder_path}")
610
+ else:
611
+ print(f"The folder {folder_path} does not exist.")
612
+
613
+ @staticmethod
614
+ def on_change_models(model_size: str):
615
+ translatable_model = ["large", "large-v1", "large-v2", "large-v3"]
616
+ if model_size not in translatable_model:
617
+ return gr.Checkbox(visible=False, value=False, interactive=False)
618
+ else:
619
+ return gr.Checkbox(visible=True, value=False, label="Translate to English?", interactive=True)
620
+
621
 
622
  # Create the parser for command-line arguments
623
  parser = argparse.ArgumentParser()