Update app.py
Browse files
app.py
CHANGED
@@ -453,11 +453,9 @@ if __name__ == '__main__':
|
|
453 |
help='The file format extension of this document',
|
454 |
required=True,
|
455 |
options=[
|
456 |
-
'
|
457 |
-
'
|
458 |
-
'
|
459 |
-
'PPTX',
|
460 |
-
'XSLX'
|
461 |
]
|
462 |
),
|
463 |
"path": st.column_config.TextColumn(
|
@@ -654,6 +652,9 @@ if __name__ == '__main__':
|
|
654 |
full_path = os.path.realpath(uploaded_file.name)
|
655 |
file_type = ext.lstrip('.')
|
656 |
|
|
|
|
|
|
|
657 |
d = {
|
658 |
'icon': os.path.join(os.getenv('HF_HOME'), icon_to_types[file_type][0]),
|
659 |
'document': base_name,
|
|
|
453 |
help='The file format extension of this document',
|
454 |
required=True,
|
455 |
options=[
|
456 |
+
'Powerpoint',
|
457 |
+
'Microsoft Word Document',
|
458 |
+
'Excel'
|
|
|
|
|
459 |
]
|
460 |
),
|
461 |
"path": st.column_config.TextColumn(
|
|
|
652 |
full_path = os.path.realpath(uploaded_file.name)
|
653 |
file_type = ext.lstrip('.')
|
654 |
|
655 |
+
value_ = os.path.exists(os.path.join(os.getenv('HF_HOME'), icon_to_types[file_type][0]))
|
656 |
+
print(f'Path Exist ? {value_}')
|
657 |
+
|
658 |
d = {
|
659 |
'icon': os.path.join(os.getenv('HF_HOME'), icon_to_types[file_type][0]),
|
660 |
'document': base_name,
|