KoRiF commited on
Commit
c6ecd7a
1 Parent(s): 0d988d1

Update app.py

Browse files

configure file environment

Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -1,9 +1,9 @@
1
  import os
2
 
3
- os.system('cmd /c "wget https://www.isi.edu/~ulf/uroman/downloads/uroman-v1.2.7.tar.gz"')
4
- os.system('cmd /c "mkdir uroman"')
5
- os.system('cmd /c "tar -zxvf ./uroman-v1.2.7.tar.gz -C ./uroman"')
6
- os.system('cmd /c "chmod +x ./uroman/bin/uroman.pl"')
7
 
8
  import gradio as gr
9
  import numpy as np
@@ -29,7 +29,7 @@ speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze
29
 
30
 
31
  def translate(audio, transliteration = lambda txt: txt):
32
- outputs = pipe(audio, max_new_tokens=256, generate_kwargs={"task": "transcribe", "language": "be"})#larusian
33
  return transliteration(outputs["text"])
34
 
35
  import subprocess
 
1
  import os
2
 
3
+ os.system("wget https://www.isi.edu/~ulf/uroman/downloads/uroman-v1.2.7.tar.gz")
4
+ os.system("mkdir uroman")
5
+ os.system("tar -zxvf ./uroman-v1.2.7.tar.gz -C ./uroman")
6
+ os.system("chmod +x ./uroman/bin/uroman.pl")
7
 
8
  import gradio as gr
9
  import numpy as np
 
29
 
30
 
31
  def translate(audio, transliteration = lambda txt: txt):
32
+ outputs = asr_pipe(audio, max_new_tokens=256, generate_kwargs={"task": "transcribe", "language": "be"})#larusian
33
  return transliteration(outputs["text"])
34
 
35
  import subprocess