Update app.py
Browse files
app.py
CHANGED
@@ -28,9 +28,20 @@ RESULTS_FILE = os.path.join(DATA_DIR, "results.csv")
|
|
28 |
|
29 |
if not os.path.exists(DATA_DIR):
|
30 |
os.makedirs(DATA_DIR)
|
31 |
-
st.
|
32 |
else:
|
33 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
def initialize_session_state():
|
36 |
if 'api_configured' not in st.session_state:
|
|
|
28 |
|
29 |
if not os.path.exists(DATA_DIR):
|
30 |
os.makedirs(DATA_DIR)
|
31 |
+
st.success(f"Created `{DATA_DIR}` directory.")
|
32 |
else:
|
33 |
+
st.info(f"`{DATA_DIR}` directory already exists.")
|
34 |
+
|
35 |
+
if os.path.exists(DATA_DIR):
|
36 |
+
files = os.listdir(DATA_DIR)
|
37 |
+
st.write(f"Contents of `{DATA_DIR}` directory:")
|
38 |
+
if files:
|
39 |
+
for file in files:
|
40 |
+
st.write(f"- {file}")
|
41 |
+
else:
|
42 |
+
st.write("The data directory is currently empty.")
|
43 |
+
else:
|
44 |
+
st.error(f"`{DATA_DIR}` directory does not exist.")
|
45 |
|
46 |
def initialize_session_state():
|
47 |
if 'api_configured' not in st.session_state:
|