Spaces:
Starting on CPU Upgrade
Starting on CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
|
@@ -431,6 +431,8 @@ if uploaded_file_paths is not None:
|
|
| 431 |
st.session_state.file_names = file_names
|
| 432 |
|
| 433 |
file_names = st.session_state.file_names
|
|
|
|
|
|
|
| 434 |
|
| 435 |
if len(file_names) == 0:
|
| 436 |
st.text("Upload file(s) to enable analysis")
|
|
@@ -566,6 +568,9 @@ if currFile is None and len(st.session_state.results) > 0 and len(st.session_sta
|
|
| 566 |
st.write("Select a file to view from the sidebar")
|
| 567 |
try:
|
| 568 |
st.session_state.resetResult = False
|
|
|
|
|
|
|
|
|
|
| 569 |
currFileIndex = file_names.index(currFile)
|
| 570 |
currPlainName = currFile.split('.')[0]
|
| 571 |
if len(st.session_state.results) > currFileIndex and len(st.session_state.summaries) > currFileIndex and len(st.session_state.results[currFileIndex]) > 0:
|
|
|
|
| 431 |
st.session_state.file_names = file_names
|
| 432 |
|
| 433 |
file_names = st.session_state.file_names
|
| 434 |
+
if not file_names:
|
| 435 |
+
file_names = []
|
| 436 |
|
| 437 |
if len(file_names) == 0:
|
| 438 |
st.text("Upload file(s) to enable analysis")
|
|
|
|
| 568 |
st.write("Select a file to view from the sidebar")
|
| 569 |
try:
|
| 570 |
st.session_state.resetResult = False
|
| 571 |
+
if currFile is None:
|
| 572 |
+
st.info("Select a file from the sidebar to view results.")
|
| 573 |
+
raise ValueError("No file selected")
|
| 574 |
currFileIndex = file_names.index(currFile)
|
| 575 |
currPlainName = currFile.split('.')[0]
|
| 576 |
if len(st.session_state.results) > currFileIndex and len(st.session_state.summaries) > currFileIndex and len(st.session_state.results[currFileIndex]) > 0:
|