bhavitvyamalik commited on
Commit
a3a0c58
1 Parent(s): a39f95b
Files changed (1) hide show
  1. apps/mic.py +2 -2
apps/mic.py CHANGED
@@ -124,7 +124,7 @@ def app(state):
124
 
125
  sequence = ['']
126
  if new_col2.button("Generate Caption", help="Generate a caption in the specified language."):
127
- with st.spinner("Generating Sequence... This might take a while, thank you for your patience!"):
128
  sequence = generate_sequence(transformed_image, lang_id, num_beams, temperature, top_p, do_sample, top_k, max_length)
129
  # print(sequence)
130
 
@@ -141,7 +141,7 @@ def app(state):
141
  clean_text = re.sub(r'[^A-Za-z0-9 ]+', '', sequence[0])
142
  # st.write("**Cleaned Text**: ",clean_text)
143
  audio_bytes = voicerss_tts(clean_text, lang_id)
144
- st.write("audio for the generated caption")
145
  st.audio(audio_bytes)
146
  except:
147
  st.info("Unabled to generate audio. Please try again in some time.")
 
124
 
125
  sequence = ['']
126
  if new_col2.button("Generate Caption", help="Generate a caption in the specified language."):
127
+ with st.spinner("Generating Sequence... This might take some time, you can read our Article meanwhile!"):
128
  sequence = generate_sequence(transformed_image, lang_id, num_beams, temperature, top_p, do_sample, top_k, max_length)
129
  # print(sequence)
130
 
 
141
  clean_text = re.sub(r'[^A-Za-z0-9 ]+', '', sequence[0])
142
  # st.write("**Cleaned Text**: ",clean_text)
143
  audio_bytes = voicerss_tts(clean_text, lang_id)
144
+ st.markdown("**Audio for the generated caption**")
145
  st.audio(audio_bytes)
146
  except:
147
  st.info("Unabled to generate audio. Please try again in some time.")