nickmuchi commited on
Commit
faf79c5
1 Parent(s): cac7541

Update functions.py

Browse files
Files changed (1) hide show
  1. functions.py +3 -2
functions.py CHANGED
@@ -63,7 +63,7 @@ memory = ConversationBufferMemory(memory_key='chat_history', return_messages=Tru
63
 
64
  #Stuff Chain Type Prompt template
65
 
66
- @st.cache_resource
67
  def load_prompt():
68
 
69
  system_template="""Use only the following pieces of earnings context to answer the users question accurately.
@@ -177,7 +177,8 @@ def load_asr_model(model_name):
177
  model = whisper.load_model(model_name)
178
 
179
  return model
180
-
 
181
  def inference(link, upload, _asr_model):
182
  '''Convert Youtube video or Audio upload to text'''
183
 
 
63
 
64
  #Stuff Chain Type Prompt template
65
 
66
+ @st.cache_data
67
  def load_prompt():
68
 
69
  system_template="""Use only the following pieces of earnings context to answer the users question accurately.
 
177
  model = whisper.load_model(model_name)
178
 
179
  return model
180
+
181
+ @st.cache_data(persist=True)
182
  def inference(link, upload, _asr_model):
183
  '''Convert Youtube video or Audio upload to text'''
184