ydshieh commited on
Commit
e53a130
1 Parent(s): cc62e3c
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -44,7 +44,7 @@ st.sidebar.write('\n')
44
  with st.spinner('Generating image caption ...'):
45
 
46
  caption = predict(image)
47
- image.close()
48
  caption_en = translator.translate(caption, src='fr', dest='en').text
49
  st.header(f'**Prediction (in French) **{caption}')
50
  st.header(f'**English Translation**: {caption_en}')
@@ -54,4 +54,6 @@ st.sidebar.write(f"French: {caption}")
54
  st.sidebar.write(f"English: {caption_en}")
55
 
56
  show = st.sidebar.image(image, use_column_width=True)
57
- show.image(image, use_column_width=True)
 
 
 
44
  with st.spinner('Generating image caption ...'):
45
 
46
  caption = predict(image)
47
+
48
  caption_en = translator.translate(caption, src='fr', dest='en').text
49
  st.header(f'**Prediction (in French) **{caption}')
50
  st.header(f'**English Translation**: {caption_en}')
 
54
  st.sidebar.write(f"English: {caption_en}")
55
 
56
  show = st.sidebar.image(image, use_column_width=True)
57
+ show.image(image, use_column_width=True)
58
+
59
+ image.close()