Skip to content

Commit

Permalink
res
Browse files Browse the repository at this point in the history
  • Loading branch information
mahithapen committed Dec 3, 2023
1 parent 31412b9 commit 53ef2fd
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions src/view/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,34 +143,34 @@ def results_page():
if st.session_state.processed_video:
st.video(open(st.session_state.processed_video, "rb").read())

st.markdown("## Statistics")

try:
with open("tmp/results.txt", "r") as file:
results_data = file.readlines()

current_section = None
results_table = []

# Process each line in the file
for line in results_data:
line = line.strip()
if line.endswith(":"): # Check if the line is a section header
if results_table: # Display the previous section's table, if any
st.markdown(f"### {current_section}")
st.table(results_table)
results_table = [] # Reset for the next section
current_section = line[:-1] # Set the new section header
elif ": " in line:
results_table.append(line.split(": "))

# Display the last section's table
if results_table:
st.markdown(f"### {current_section}")
st.table(results_table)

except FileNotFoundError:
st.error("Results file not found.")
st.markdown("## Statistics")

try:
with open("tmp/results.txt", "r") as file:
results_data = file.readlines()

current_section = None
results_table = []

# Process each line in the file
for line in results_data:
line = line.strip()
if line.endswith(":"): # Check if the line is a section header
if results_table: # Display the previous section's table, if any
st.markdown(f"### {current_section}")
st.table(results_table)
results_table = [] # Reset for the next section
current_section = line[:-1] # Set the new section header
elif ": " in line:
results_table.append(line.split(": "))

# Display the last section's table
if results_table:
st.markdown(f"### {current_section}")
st.table(results_table)

except FileNotFoundError:
st.error("Results file not found.")
st.markdown("## MiniMap")
try:
video_file_path = 'tmp/minimap.mp4'
Expand Down

0 comments on commit 53ef2fd

Please sign in to comment.