anderbogia commited on
Commit
449112a
·
verified ·
1 Parent(s): 433efc6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -1,14 +1,10 @@
1
  import os
2
- #os.system("curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y") #Installing Rust manually
3
- #os.system("exec bash")
4
- #os.system("pip install --upgrade pip")
5
  os.system("pip install --upgrade transformers accelerate")
6
  os.system("pip install tokenizers fairseq")
7
- os.system("pip install numpy==1.24") #NumPy 1.24 or less needed by Numba. Use 1.23, librosa still uses np.complex which was dropped in NumPy 1.24
8
- #os.system("pip install git+https://github.com/huggingface/transformers datasets[torch]")
9
  os.system("pip install torch transformers accelerate torchaudio datasets")
10
  os.system("pip install librosa==0.9.0")
11
- os.system("pip install gradio==4.16.0") # Rollback to pre 4.17.0 due to gr Audio bandwidth issues
12
 
13
  import scipy
14
  import gradio as gr
@@ -92,7 +88,7 @@ with gr.Blocks(theme = gr.themes.Soft()) as demo:
92
  button1.click(transcribe, inputs = input_audio, outputs = output_text)
93
 
94
  with gr.Tab("Ginarit kumaa rolou"):
95
- input_text = gr.components.Textbox(label = "Ginarit", placeholder = "Potutakai suat nu hiti")
96
  button2 = gr.Button("Poulayo'")
97
  output_audio = gr.Audio(label = "Rolou pinoulai")
98
  button2.click(tts_run, inputs = input_text, outputs = output_audio)
 
1
  import os
 
 
 
2
  os.system("pip install --upgrade transformers accelerate")
3
  os.system("pip install tokenizers fairseq")
4
+ os.system("pip install numpy==1.24") #NumPy 1.24 or less needed by Numba
 
5
  os.system("pip install torch transformers accelerate torchaudio datasets")
6
  os.system("pip install librosa==0.9.0")
7
+ os.system("pip install gradio==4.16.0") # Rollback to pre 4.17.0 due to gr Audio playback issues
8
 
9
  import scipy
10
  import gradio as gr
 
88
  button1.click(transcribe, inputs = input_audio, outputs = output_text)
89
 
90
  with gr.Tab("Ginarit kumaa rolou"):
91
+ input_text = gr.components.Textbox(label = "Ginarit", placeholder = "Popupukai suat nu hiti")
92
  button2 = gr.Button("Poulayo'")
93
  output_audio = gr.Audio(label = "Rolou pinoulai")
94
  button2.click(tts_run, inputs = input_text, outputs = output_audio)