Renjith Karimattathil SASIDHARAN commited on
Commit
6f8c4ca
1 Parent(s): f135978
Files changed (2) hide show
  1. __pycache__/app.cpython-39.pyc +0 -0
  2. app.py +3 -3
__pycache__/app.cpython-39.pyc CHANGED
Binary files a/__pycache__/app.cpython-39.pyc and b/__pycache__/app.cpython-39.pyc differ
 
app.py CHANGED
@@ -97,9 +97,9 @@ def create_latest_profit_plot(strategy, profits):
97
  ])
98
 
99
  if profits == 'Profits':
100
- return [gr.update(value=plot, visible=True), gr.update(value=profits_table, visible=True)]
101
  if profits == 'Trades':
102
- return gr.update(value=trades_table, visible=True)
103
 
104
 
105
  with gr.Blocks() as demo:
@@ -124,7 +124,7 @@ with gr.Blocks() as demo:
124
  trades_plot = gr.Plot(visible=False)
125
 
126
 
127
- fetch.click(create_latest_profit_plot, inputs=[strategy, type], outputs=[profits_plot, profits_table])
128
  # fetch.click(create_latest_profit_plot, inputs=[strategy, type], outputs=trades_plot)
129
  # fetch.click(create_issue_plot, inputs=[libraries, issues], outputs=issue_plot)
130
 
 
97
  ])
98
 
99
  if profits == 'Profits':
100
+ return [gr.update(value=plot, visible=True), gr.update(value=profits_table, visible=True), gr.update(value=plot, visible=False)]
101
  if profits == 'Trades':
102
+ return [gr.update(value=plot, visible=False), gr.update(value=profits_table, visible=False), gr.update(value=trades_table, visible=True)]
103
 
104
 
105
  with gr.Blocks() as demo:
 
124
  trades_plot = gr.Plot(visible=False)
125
 
126
 
127
+ fetch.click(create_latest_profit_plot, inputs=[strategy, type], outputs=[profits_plot, profits_table, trades_plot])
128
  # fetch.click(create_latest_profit_plot, inputs=[strategy, type], outputs=trades_plot)
129
  # fetch.click(create_issue_plot, inputs=[libraries, issues], outputs=issue_plot)
130