Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
•
1dbf257
1
Parent(s):
6477254
Update app.py
Browse files
app.py
CHANGED
@@ -38,9 +38,9 @@ if not is_spaces:
|
|
38 |
MAX_IMAGES = 150
|
39 |
|
40 |
|
41 |
-
def load_captioning(
|
42 |
-
uploaded_images = [file for file in
|
43 |
-
txt_files = [file for file in
|
44 |
txt_files_dict = {os.path.splitext(os.path.basename(txt_file))[0]: txt_file for txt_file in txt_files}
|
45 |
print(txt_files)
|
46 |
print(txt_files_dict)
|
|
|
38 |
MAX_IMAGES = 150
|
39 |
|
40 |
|
41 |
+
def load_captioning(uploaded_files, concept_sentence):
|
42 |
+
uploaded_images = [file for file in uploaded_files if not file.endswith('.txt')]
|
43 |
+
txt_files = [file for file in uploaded_files if file.endswith('.txt')]
|
44 |
txt_files_dict = {os.path.splitext(os.path.basename(txt_file))[0]: txt_file for txt_file in txt_files}
|
45 |
print(txt_files)
|
46 |
print(txt_files_dict)
|