Update app.py
Browse files
app.py
CHANGED
@@ -30,6 +30,11 @@ def update_csv_file(uploaded_file, name, image_type):
|
|
30 |
|
31 |
def get_uploaded_files_info():
|
32 |
csv_file_path = "Resources.csv"
|
|
|
|
|
|
|
|
|
|
|
33 |
with open(csv_file_path, mode='r') as csv_file:
|
34 |
csv_reader = csv.reader(csv_file)
|
35 |
files_info = []
|
|
|
30 |
|
31 |
def get_uploaded_files_info():
|
32 |
csv_file_path = "Resources.csv"
|
33 |
+
if not os.path.exists(csv_file_path):
|
34 |
+
with open(csv_file_path, mode='w', newline='') as csv_file:
|
35 |
+
csv_writer = csv.writer(csv_file)
|
36 |
+
csv_writer.writerow(['Name', 'File Name', 'Type'])
|
37 |
+
|
38 |
with open(csv_file_path, mode='r') as csv_file:
|
39 |
csv_reader = csv.reader(csv_file)
|
40 |
files_info = []
|