Prathamesh1420 commited on
Commit
6902a03
·
verified ·
1 Parent(s): 3d5fbd4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
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
- st.write(f"Trying to open file: {file_path}") # Add debug info
 
113
  try:
114
- if os.path.exists(file_path):
115
  with col:
116
- st.image(file_path)
117
  else:
118
- st.error(f"File does not exist: {file_path}")
119
  except Exception as e:
120
- st.error(f"Error opening file {file_path}: {e}")
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()