Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -67,10 +67,12 @@ def load_captioning(uploaded_images, concept_sentence):
|
|
| 67 |
updates.append(gr.update(value=image_value, visible=visible))
|
| 68 |
|
| 69 |
corresponding_caption = False
|
|
|
|
| 70 |
if(image_value):
|
|
|
|
| 71 |
base_name = image_value.rsplit('.', 1)[0]
|
| 72 |
-
|
| 73 |
corresponding_txt = base_name + '.txt'
|
|
|
|
| 74 |
if corresponding_txt in txt_files:
|
| 75 |
with open(corresponding_txt, 'r') as file:
|
| 76 |
corresponding_caption = file.read()
|
|
|
|
| 67 |
updates.append(gr.update(value=image_value, visible=visible))
|
| 68 |
|
| 69 |
corresponding_caption = False
|
| 70 |
+
print(txt_files)
|
| 71 |
if(image_value):
|
| 72 |
+
print(image_value)
|
| 73 |
base_name = image_value.rsplit('.', 1)[0]
|
|
|
|
| 74 |
corresponding_txt = base_name + '.txt'
|
| 75 |
+
print(corresponding_txt)
|
| 76 |
if corresponding_txt in txt_files:
|
| 77 |
with open(corresponding_txt, 'r') as file:
|
| 78 |
corresponding_caption = file.read()
|