shubh2014shiv commited on
Commit
812ca6d
•
1 Parent(s): 4e99c2c

Added waiting placeholder for Business Scene Dialogue ja to en translation

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -325,6 +325,7 @@ elif topic == "Japanese to English Translation":
325
  st.write(bsd_jp)
326
 
327
  if st.button("Translate"):
 
328
  ja_tokenizer, en_tokenizer = getJpEn_Tokenizers()
329
  trained_model = loadFineTunedJaEn_NMT_Model()
330
  trained_model.freeze()
@@ -355,7 +356,7 @@ elif topic == "Japanese to English Translation":
355
  gen_id in generated_ids]
356
 
357
  return "".join(preds)[5:]
358
-
359
 
360
  st.markdown(
361
  "<h2 style='text-align: left; color:#32CD32; font-size:25px;'><b>Translated Dialog in English (英語の翻訳されたダイアログ)<b></h2>",
 
325
  st.write(bsd_jp)
326
 
327
  if st.button("Translate"):
328
+ waitPlaceholder = st.image("wait.gif")
329
  ja_tokenizer, en_tokenizer = getJpEn_Tokenizers()
330
  trained_model = loadFineTunedJaEn_NMT_Model()
331
  trained_model.freeze()
 
356
  gen_id in generated_ids]
357
 
358
  return "".join(preds)[5:]
359
+ waitPlaceholder.empty()
360
 
361
  st.markdown(
362
  "<h2 style='text-align: left; color:#32CD32; font-size:25px;'><b>Translated Dialog in English (英語の翻訳されたダイアログ)<b></h2>",