sss2000 commited on
Commit
7c36d1f
1 Parent(s): 23b6e81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -12,8 +12,7 @@ def audio2txt(audioname):
12
  return rst['text']
13
 
14
  # Function to translate text
15
- @st.cache_resource
16
-
17
  def translation(txt):
18
  pipe = pipeline("translation", model= "Helsinki-NLP/opus-mt-en-zh")
19
  rst = pipe(txt)
 
12
  return rst['text']
13
 
14
  # Function to translate text
15
+ @st.cache
 
16
  def translation(txt):
17
  pipe = pipeline("translation", model= "Helsinki-NLP/opus-mt-en-zh")
18
  rst = pipe(txt)