ReneeYe commited on
Commit
d8aa18e
β€’
1 Parent(s): 7216128
Files changed (2) hide show
  1. .gitignore +6 -8
  2. app.py +4 -4
.gitignore CHANGED
@@ -1,16 +1,14 @@
1
- ./ConST
2
- ./fairseq
3
- ./fairseq_cli
4
- ./fairseq.egg_info
5
  hubconf.py
6
  LICENSE
7
  pyproject.toml
8
- ./build
9
  setup.py
10
  train.py
11
  requirements.apt.txt
12
- ./ConST
13
  ./.eggs
14
  ./.idea
15
- ./build
16
- ./docs
 
1
+ ./ConST/
2
+ ./fairseq/
3
+ ./fairseq_cli/
4
+ ./fairseq.egg_info/
5
  hubconf.py
6
  LICENSE
7
  pyproject.toml
 
8
  setup.py
9
  train.py
10
  requirements.apt.txt
 
11
  ./.eggs
12
  ./.idea
13
+ ./build/
14
+ ./docs/
app.py CHANGED
@@ -12,7 +12,7 @@ import shutil
12
  import yaml
13
  import torchaudio
14
  import gradio as gr
15
- from huggingface_hub import snapshot_download
16
 
17
 
18
  LANGUAGE_CODES = {
@@ -40,8 +40,8 @@ LANG_GEN_SETUPS = {
40
  os.system("git clone https://github.com/ReneeYe/ConST")
41
  os.system('mv ConST/* ./')
42
  os.system("rm -rf ConST")
43
- os.system("python3 setup.py install")
44
- os.system("python3 setup.py build_ext --inplace")
45
  os.system("mkdir -p data checkpoint")
46
 
47
 
@@ -71,7 +71,7 @@ def get_vocab_and_yaml(language):
71
 
72
  # write yaml file
73
  abs_path = os.popen("pwd").read().strip()
74
- yaml_dict = LANG_GEN_SETUPS["tgt_lang"]
75
  yaml_dict["input_channels"] = 1
76
  yaml_dict["use_audio_input"] = True
77
  yaml_dict["prepend_tgt_lang_tag"] = True
 
12
  import yaml
13
  import torchaudio
14
  import gradio as gr
15
+ from huggingface_hub import snapshot_download, hf_hub_url
16
 
17
 
18
  LANGUAGE_CODES = {
 
40
  os.system("git clone https://github.com/ReneeYe/ConST")
41
  os.system('mv ConST/* ./')
42
  os.system("rm -rf ConST")
43
+ os.system("sudo python3 setup.py install")
44
+ os.system("sudo python3 setup.py build_ext --inplace")
45
  os.system("mkdir -p data checkpoint")
46
 
47
 
 
71
 
72
  # write yaml file
73
  abs_path = os.popen("pwd").read().strip()
74
+ yaml_dict = LANG_GEN_SETUPS[tgt_lang]
75
  yaml_dict["input_channels"] = 1
76
  yaml_dict["use_audio_input"] = True
77
  yaml_dict["prepend_tgt_lang_tag"] = True