awacke1 commited on
Commit
0420d17
·
1 Parent(s): 0b0f7c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -1
app.py CHANGED
@@ -72,4 +72,20 @@ else:
72
  while True:
73
  time.sleep(20)
74
  st.empty()
75
- display_images_from_csv()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  while True:
73
  time.sleep(20)
74
  st.empty()
75
+ display_images_from_csv()
76
+
77
+ csv_file_path = "Resources.csv"
78
+ with open(csv_file_path, mode='r') as f:
79
+ rows = list(csv.reader(f))
80
+
81
+ # show the csv file
82
+ if rows:
83
+ headers = ["Name", "File Name", "Image Type"]
84
+ rows.insert(0, headers)
85
+ table = "|".join(headers) + "|\n"
86
+ table += "|".join(['---'] * len(headers)) + "|\n"
87
+ for row in rows[1:]:
88
+ table += "|".join(row) + "|\n"
89
+ st.markdown(table)
90
+ else:
91
+ st.write("No files found.")