Update app.py
Browse files
app.py
CHANGED
|
@@ -156,11 +156,11 @@ def predict(cap_col, img, target_language):
|
|
| 156 |
translated_caption = translate(pred_caption, target_language)
|
| 157 |
captions.append(translated_caption)
|
| 158 |
|
| 159 |
-
|
| 160 |
-
pred_caption = image_to_text(img)
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
|
| 165 |
cap_col.markdown('<div class="caption-container">', unsafe_allow_html=True)
|
| 166 |
for c in captions:
|
|
@@ -179,7 +179,7 @@ def generate_caption_section():
|
|
| 179 |
# Language selection dropdown
|
| 180 |
|
| 181 |
|
| 182 |
-
target_language = st.selectbox('Select Target Language', ['
|
| 183 |
|
| 184 |
# Process image and generate captions
|
| 185 |
if img_url:
|
|
|
|
| 156 |
translated_caption = translate(pred_caption, target_language)
|
| 157 |
captions.append(translated_caption)
|
| 158 |
|
| 159 |
+
# for _ in range(4):
|
| 160 |
+
#pred_caption = image_to_text(img)
|
| 161 |
+
# if pred_caption not in captions:
|
| 162 |
+
# translated_caption = translate(pred_caption, target_language)
|
| 163 |
+
# captions.append(translated_caption)
|
| 164 |
|
| 165 |
cap_col.markdown('<div class="caption-container">', unsafe_allow_html=True)
|
| 166 |
for c in captions:
|
|
|
|
| 179 |
# Language selection dropdown
|
| 180 |
|
| 181 |
|
| 182 |
+
target_language = st.selectbox('Select Target Language', ['Tamil', 'Spanish', 'Hindi', 'Italian'], index=0)
|
| 183 |
|
| 184 |
# Process image and generate captions
|
| 185 |
if img_url:
|