ahmedJaafari commited on
Commit
e662762
1 Parent(s): 363b5a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,5 +1,4 @@
1
  import gradio as gr
2
- import streamlit as st
3
  import numpy as np
4
  from transformers.file_utils import cached_path, hf_bucket_url
5
  import os
@@ -10,8 +9,8 @@ import kenlm
10
  import torchaudio
11
 
12
  cache_dir = './cache/'
13
- processor = Wav2Vec2ProcessorWithLM.from_pretrained("ahmedJaafari/Annarabic3.2", cache_dir=cache_dir, use_auth_token=st.secrets["AnnarabicToken"])
14
- model = AutoModelForCTC.from_pretrained("ahmedJaafari/Annarabic3.2", cache_dir=cache_dir, use_auth_token=st.secrets["AnnarabicToken"])
15
 
16
  # define function to read in sound file
17
  def speech_file_to_array_fn(path, max_seconds=120):
 
1
  import gradio as gr
 
2
  import numpy as np
3
  from transformers.file_utils import cached_path, hf_bucket_url
4
  import os
 
9
  import torchaudio
10
 
11
  cache_dir = './cache/'
12
+ processor = Wav2Vec2ProcessorWithLM.from_pretrained("ahmedJaafari/Annarabic3.2", cache_dir=cache_dir, use_auth_token=os.getenv("AnnarabicToken"))
13
+ model = AutoModelForCTC.from_pretrained("ahmedJaafari/Annarabic3.2", cache_dir=cache_dir, use_auth_token=os.getenv("AnnarabicToken"))
14
 
15
  # define function to read in sound file
16
  def speech_file_to_array_fn(path, max_seconds=120):