Yoni commited on
Commit
a86f89e
·
1 Parent(s): 038f4bc

no message

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -5,13 +5,16 @@ import gradio as gr
5
  from faster_whisper import WhisperModel
6
  import tempfile
7
  from huggingface_hub import hf_hub_download
 
 
8
 
9
  # Unzip and install cleaned israwave
10
  if not os.path.exists("israwave-main"):
11
  with zipfile.ZipFile("israwave-clean.zip", "r") as zip_ref:
12
  zip_ref.extractall(".")
13
- os.system("pip install ./israwave-main")
14
 
 
15
  from israwave import IsrawaveTTS
16
 
17
  # Download model files from HF dataset (YoniAfek/israwaveTTS)
 
5
  from faster_whisper import WhisperModel
6
  import tempfile
7
  from huggingface_hub import hf_hub_download
8
+ import subprocess
9
+ import sys
10
 
11
  # Unzip and install cleaned israwave
12
  if not os.path.exists("israwave-main"):
13
  with zipfile.ZipFile("israwave-clean.zip", "r") as zip_ref:
14
  zip_ref.extractall(".")
15
+ subprocess.check_call([sys.executable, "-m", "pip", "install", "./israwave-main"])
16
 
17
+ # Only after install, import israwave
18
  from israwave import IsrawaveTTS
19
 
20
  # Download model files from HF dataset (YoniAfek/israwaveTTS)