alisrbdni commited on
Commit
4a865a4
·
verified ·
1 Parent(s): 6c4f924

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -351,7 +351,7 @@ class CustomClient(fl.client.NumPyClient):
351
  import matplotlib.pyplot as plt
352
  import re
353
 
354
- def read_log_file(log_path='log.txt'):
355
  with open(log_path, 'r') as file:
356
  log_lines = file.readlines()
357
  return log_lines
@@ -436,7 +436,7 @@ def plot_metrics(rounds, clients, memory_usage):
436
  st.pyplot(plt)
437
 
438
 
439
- def read_log_file():
440
  with open("./log.txt", "r") as file:
441
  return file.read()
442
 
@@ -502,7 +502,7 @@ def main():
502
 
503
  for round_num in range(NUM_ROUNDS):
504
  st.write(f"### Round {round_num + 1}")
505
- st.markdown(read_log_file())
506
  plot_placeholders = [st.empty() for _ in range(NUM_CLIENTS)]
507
 
508
  fl.simulation.start_simulation(
 
351
  import matplotlib.pyplot as plt
352
  import re
353
 
354
+ def read_log_file(log_path='./log.txt'):
355
  with open(log_path, 'r') as file:
356
  log_lines = file.readlines()
357
  return log_lines
 
436
  st.pyplot(plt)
437
 
438
 
439
+ def read_log_file2():
440
  with open("./log.txt", "r") as file:
441
  return file.read()
442
 
 
502
 
503
  for round_num in range(NUM_ROUNDS):
504
  st.write(f"### Round {round_num + 1}")
505
+ st.markdown(read_log_file2())
506
  plot_placeholders = [st.empty() for _ in range(NUM_CLIENTS)]
507
 
508
  fl.simulation.start_simulation(