Update app.py
Browse files
app.py
CHANGED
@@ -109,15 +109,16 @@ def show_dashboard():
|
|
109 |
|
110 |
for col, idx in zip(columns, indices[0]):
|
111 |
file_path = filenames[idx]
|
112 |
-
|
|
|
113 |
try:
|
114 |
-
if os.path.exists(
|
115 |
with col:
|
116 |
-
st.image(
|
117 |
else:
|
118 |
-
st.error(f"File does not exist: {
|
119 |
except Exception as e:
|
120 |
-
st.error(f"Error opening file {
|
121 |
else:
|
122 |
st.error("Some error occurred in file upload")
|
123 |
|
@@ -149,4 +150,4 @@ def main():
|
|
149 |
|
150 |
# Run the main app
|
151 |
if __name__ == "__main__":
|
152 |
-
main()
|
|
|
109 |
|
110 |
for col, idx in zip(columns, indices[0]):
|
111 |
file_path = filenames[idx]
|
112 |
+
full_path = os.path.join(extract_to, os.path.basename(file_path))
|
113 |
+
st.write(f"Trying to open file: {full_path}") # Add debug info
|
114 |
try:
|
115 |
+
if os.path.exists(full_path):
|
116 |
with col:
|
117 |
+
st.image(full_path)
|
118 |
else:
|
119 |
+
st.error(f"File does not exist: {full_path}")
|
120 |
except Exception as e:
|
121 |
+
st.error(f"Error opening file {full_path}: {e}")
|
122 |
else:
|
123 |
st.error("Some error occurred in file upload")
|
124 |
|
|
|
150 |
|
151 |
# Run the main app
|
152 |
if __name__ == "__main__":
|
153 |
+
main()
|