Update app.py
Browse files
app.py
CHANGED
|
@@ -19,14 +19,11 @@ def predict():
|
|
| 19 |
st.markdown('#### Predicted Captions:')
|
| 20 |
captions.append(pred_caption)
|
| 21 |
|
| 22 |
-
for _ in range(
|
| 23 |
pred_caption = generate_caption('tmp.jpg', caption_model, add_noise=True)
|
| 24 |
|
| 25 |
if pred_caption not in captions:
|
| 26 |
captions.append(pred_caption)
|
| 27 |
-
|
| 28 |
-
if len(captions)==3:
|
| 29 |
-
return
|
| 30 |
|
| 31 |
for c in captions:
|
| 32 |
st.write(c)
|
|
|
|
| 19 |
st.markdown('#### Predicted Captions:')
|
| 20 |
captions.append(pred_caption)
|
| 21 |
|
| 22 |
+
for _ in range(4):
|
| 23 |
pred_caption = generate_caption('tmp.jpg', caption_model, add_noise=True)
|
| 24 |
|
| 25 |
if pred_caption not in captions:
|
| 26 |
captions.append(pred_caption)
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
for c in captions:
|
| 29 |
st.write(c)
|