nickmuchi commited on
Commit
a5008d2
1 Parent(s): 1172ae8

Update functions.py

Browse files
Files changed (1) hide show
  1. functions.py +9 -8
functions.py CHANGED
@@ -83,6 +83,14 @@ def load_models():
83
 
84
  return sent_pipe, sum_pipe, ner_pipe, cross_encoder, sbert
85
 
 
 
 
 
 
 
 
 
86
  @st.cache_resource
87
  def get_spacy():
88
  nlp = en_core_web_lg.load()
@@ -134,13 +142,6 @@ def get_yt_audio_dl(url):
134
 
135
  return audio_file, title
136
 
137
- @st.cache_data
138
- def load_asr_model(model_name):
139
-
140
- '''Load the open source whisper model in cases where the API is not working'''
141
- model = whisper.load_model(model_name)
142
-
143
- return model
144
 
145
  @st.cache_data
146
  def load_whisper_api(audio):
@@ -245,7 +246,7 @@ def transcribe_yt_video(url, py_tube=True):
245
  return results, title
246
 
247
  @st.cache_data
248
- def inference(link, upload, _asr_model):
249
  '''Convert Youtube video or Audio upload to text'''
250
 
251
  try:
 
83
 
84
  return sent_pipe, sum_pipe, ner_pipe, cross_encoder, sbert
85
 
86
+ @st.cache_data
87
+ def load_asr_model(model_name):
88
+
89
+ '''Load the open source whisper model in cases where the API is not working'''
90
+ model = whisper.load_model(model_name)
91
+
92
+ return model
93
+
94
  @st.cache_resource
95
  def get_spacy():
96
  nlp = en_core_web_lg.load()
 
142
 
143
  return audio_file, title
144
 
 
 
 
 
 
 
 
145
 
146
  @st.cache_data
147
  def load_whisper_api(audio):
 
246
  return results, title
247
 
248
  @st.cache_data
249
+ def inference(link, upload):
250
  '''Convert Youtube video or Audio upload to text'''
251
 
252
  try: