jason-on-salt-a40 commited on
Commit
93adc07
1 Parent(s): b1f4e2f

remove server name to get public launch

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -63,7 +63,7 @@ class WhisperModel:
63
  def transcribe(self, audio_path):
64
  return self.model.transcribe(audio_path, suppress_tokens=self.supress_tokens, word_timestamps=True)["segments"]
65
 
66
-
67
  class WhisperxModel:
68
  def __init__(self, model_name, align_model: WhisperxAlignModel):
69
  from whisperx import load_model
@@ -605,7 +605,6 @@ if __name__ == "__main__":
605
  parser.add_argument("--models-path", default="./pretrained_models", help="Path to voicecraft models directory")
606
  parser.add_argument("--port", default=7860, type=int, help="App port")
607
  parser.add_argument("--share", action="store_true", help="Launch with public url")
608
- parser.add_argument("--server_name", default="127.0.0.1", type=str, help="Server name for launching the app. 127.0.0.1 for localhost; 0.0.0.0 to allow access from other machines in the local network. Might also give access to external users depends on the firewall settings.")
609
 
610
  os.environ["USER"] = os.getenv("USER", "user")
611
  args = parser.parse_args()
@@ -614,4 +613,4 @@ if __name__ == "__main__":
614
  MODELS_PATH = args.models_path
615
 
616
  app = get_app()
617
- app.queue().launch(share=args.share, server_name=args.server_name, server_port=args.port)
 
63
  def transcribe(self, audio_path):
64
  return self.model.transcribe(audio_path, suppress_tokens=self.supress_tokens, word_timestamps=True)["segments"]
65
 
66
+ @spaces.GPU(duration=120)
67
  class WhisperxModel:
68
  def __init__(self, model_name, align_model: WhisperxAlignModel):
69
  from whisperx import load_model
 
605
  parser.add_argument("--models-path", default="./pretrained_models", help="Path to voicecraft models directory")
606
  parser.add_argument("--port", default=7860, type=int, help="App port")
607
  parser.add_argument("--share", action="store_true", help="Launch with public url")
 
608
 
609
  os.environ["USER"] = os.getenv("USER", "user")
610
  args = parser.parse_args()
 
613
  MODELS_PATH = args.models_path
614
 
615
  app = get_app()
616
+ app.queue().launch(share=args.share, server_port=args.port)