shubh2014shiv commited on
Commit
4e99c2c
1 Parent(s): 3c3dfb5

Rectified pickle file error in BSD jp to en translation

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -23,6 +23,7 @@ class TranslationModel(pl.LightningModule):
23
 
24
  #@st.experimental_singleton
25
  def loadFineTunedJaEn_NMT_Model():
 
26
  save_dest = Path('model')
27
  save_dest.mkdir(exist_ok=True)
28
  st.write("Creating new folder for downloading the Japanese to English Translation Model. ")
@@ -32,10 +33,11 @@ def loadFineTunedJaEn_NMT_Model():
32
  with st.spinner("Downloading model.This may take a while! \n Don't refresh or close this page!"):
33
  from GD_download import download_file_from_google_drive
34
  download_file_from_google_drive('1CZQKGj9hSqj7kEuJp_jm7bNVXrbcFsgP', f_checkpoint)
 
 
 
35
 
36
- trained_model = TranslationModel.load_from_checkpoint(f_checkpoint)
37
-
38
- return trained_model
39
 
40
  @st.experimental_singleton
41
  def getJpEn_Tokenizers():
 
23
 
24
  #@st.experimental_singleton
25
  def loadFineTunedJaEn_NMT_Model():
26
+ '''
27
  save_dest = Path('model')
28
  save_dest.mkdir(exist_ok=True)
29
  st.write("Creating new folder for downloading the Japanese to English Translation Model. ")
 
33
  with st.spinner("Downloading model.This may take a while! \n Don't refresh or close this page!"):
34
  from GD_download import download_file_from_google_drive
35
  download_file_from_google_drive('1CZQKGj9hSqj7kEuJp_jm7bNVXrbcFsgP', f_checkpoint)
36
+ '''
37
+ bsd_jp_to_eng_trained_model = TranslationModel.load_from_checkpoint(Path("business_dialogue_japanese_english_model_fine_tuned.ckpt"))
38
+
39
 
40
+ return bsd_jp_to_eng_trained_model
 
 
41
 
42
  @st.experimental_singleton
43
  def getJpEn_Tokenizers():