asataura commited on
Commit
039e45e
·
1 Parent(s): 6b43fcc

Improving the UI

Browse files
Files changed (2) hide show
  1. app.py +0 -6
  2. trainer.py +2 -2
app.py CHANGED
@@ -45,17 +45,11 @@ def main():
45
 
46
 
47
  def perform_training(jammer_type, channel_switching_cost):
48
- st.sidebar.write("======================")
49
- st.sidebar.write('Training Starting')
50
  train(jammer_type, channel_switching_cost)
51
 
52
 
53
  def perform_testing(jammer_type, channel_switching_cost):
54
- st.sidebar.write("======================")
55
- st.sidebar.write('Testing Starting')
56
  test(jammer_type, channel_switching_cost)
57
- st.sidebar.write("Testing completed")
58
- st.sidebar.write("======================")
59
 
60
 
61
  if __name__ == "__main__":
 
45
 
46
 
47
  def perform_training(jammer_type, channel_switching_cost):
 
 
48
  train(jammer_type, channel_switching_cost)
49
 
50
 
51
  def perform_testing(jammer_type, channel_switching_cost):
 
 
52
  test(jammer_type, channel_switching_cost)
 
 
53
 
54
 
55
  if __name__ == "__main__":
trainer.py CHANGED
@@ -81,8 +81,8 @@ def train(jammer_type, channel_switching_cost):
81
 
82
  # Display the Streamlit figure using streamlit.pyplot
83
  st.set_option('deprecation.showPyplotGlobalUse', False)
84
- st.sidebar.subheader("Training Graph")
85
- st.sidebar.pyplot(fig)
86
 
87
  # Save the figure
88
  plot_name = f'./data/train_rewards_{jammer_type}_csc_{channel_switching_cost}.png'
 
81
 
82
  # Display the Streamlit figure using streamlit.pyplot
83
  st.set_option('deprecation.showPyplotGlobalUse', False)
84
+ st.subheader("Training Graph")
85
+ st.pyplot(fig)
86
 
87
  # Save the figure
88
  plot_name = f'./data/train_rewards_{jammer_type}_csc_{channel_switching_cost}.png'