sss2000 commited on
Commit
824cdd2
1 Parent(s): 7c36d1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -2
app.py CHANGED
@@ -5,14 +5,12 @@ st.set_page_config(page_title="Your English audio to Chinese text", page_icon="
5
  st.header("Turn Your English Audio to Chinese text")
6
 
7
  # Function to convert audio to text
8
- @st.cache_data
9
  def audio2txt(audioname):
10
  pipe = pipeline("automatic-speech-recognition", model="avery0/pipeline1model2")
11
  rst = pipe(audioname)
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)
 
5
  st.header("Turn Your English Audio to Chinese text")
6
 
7
  # Function to convert audio to text
 
8
  def audio2txt(audioname):
9
  pipe = pipeline("automatic-speech-recognition", model="avery0/pipeline1model2")
10
  rst = pipe(audioname)
11
  return rst['text']
12
 
13
  # Function to translate text
 
14
  def translation(txt):
15
  pipe = pipeline("translation", model= "Helsinki-NLP/opus-mt-en-zh")
16
  rst = pipe(txt)