gchhablani commited on
Commit
62c196c
1 Parent(s): 0ad09b6

Fix state issues

Browse files
Files changed (2) hide show
  1. apps/mlm.py +3 -0
  2. apps/vqa.py +1 -1
apps/mlm.py CHANGED
@@ -116,6 +116,9 @@ def app(state):
116
  help="Type your masked caption regarding the image above in one of the four languages.",
117
  )
118
 
 
 
 
119
  if mlm_state.unmasked_caption == mlm_state.caption.replace("[MASK]", mlm_state.currently_masked_token):
120
  new_col2.markdown("**Masked Token**: "+mlm_state.currently_masked_token)
121
  new_col2.markdown("**English Translation: " + mlm_state.unmasked_caption if mlm_state.caption_lang_id == "en" else translate(mlm_state.unmasked_caption, 'en'))
116
  help="Type your masked caption regarding the image above in one of the four languages.",
117
  )
118
 
119
+ print(mlm_state.currently_maskd_token)
120
+ print(mlm_state.unmasked_caption)
121
+ print(mlm_state.caption)
122
  if mlm_state.unmasked_caption == mlm_state.caption.replace("[MASK]", mlm_state.currently_masked_token):
123
  new_col2.markdown("**Masked Token**: "+mlm_state.currently_masked_token)
124
  new_col2.markdown("**English Translation: " + mlm_state.unmasked_caption if mlm_state.caption_lang_id == "en" else translate(mlm_state.unmasked_caption, 'en'))
apps/vqa.py CHANGED
@@ -101,7 +101,7 @@ def app(state):
101
  if col3.button("Use above URL"):
102
  image_data = requests.get(query1, stream=True).raw
103
  image = np.asarray(Image.open(image_data))
104
- vqa_state.mlm_image = image
105
 
106
  transformed_image = get_transformed_image(vqa_state.vqa_image)
107
 
101
  if col3.button("Use above URL"):
102
  image_data = requests.get(query1, stream=True).raw
103
  image = np.asarray(Image.open(image_data))
104
+ vqa_state.vqa_image = image
105
 
106
  transformed_image = get_transformed_image(vqa_state.vqa_image)
107