Spaces:
Runtime error
Runtime error
ydshieh
commited on
Commit
·
2cd4a71
1
Parent(s):
76136cc
add en translation
Browse files
app.py
CHANGED
@@ -46,9 +46,9 @@ with st.spinner('Generating image caption ...'):
|
|
46 |
caption = predict(image)
|
47 |
image.close()
|
48 |
caption_en = translator.translate(caption, src='fr', dest='en')
|
49 |
-
st.header('Prediction
|
50 |
st.subheader(f'{caption}\n')
|
51 |
-
st.subheader(f'English Translation
|
52 |
|
53 |
st.sidebar.header("ViT-GPT2 predicts:")
|
54 |
st.sidebar.write(f"{caption}", '\n')
|
|
|
46 |
caption = predict(image)
|
47 |
image.close()
|
48 |
caption_en = translator.translate(caption, src='fr', dest='en')
|
49 |
+
st.header('**Prediction**:')
|
50 |
st.subheader(f'{caption}\n')
|
51 |
+
st.subheader(f'**English Translation**: {caption_en}\n')
|
52 |
|
53 |
st.sidebar.header("ViT-GPT2 predicts:")
|
54 |
st.sidebar.write(f"{caption}", '\n')
|