Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,8 +12,7 @@ def audio2txt(audioname):
|
|
12 |
return rst['text']
|
13 |
|
14 |
# Function to translate text
|
15 |
-
@st.
|
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)
|