modernai commited on
Commit
b2b0188
·
verified ·
1 Parent(s): aa683a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -28,13 +28,14 @@ with gr.Blocks() as demo:
28
  # This is the Current Recommended Portfolio Allocation
29
  """
30
  )
31
- total_funds_input = gr.Number(value=0)
32
- submit_button = gr.Button("Submit", elem_id="btn", elem_classes=["abc", "def"])
 
33
 
34
  plot = gr.Plot(label="Portfolio Composition Chart")
35
- plot.change(create_portfolio_graph, inputs=[total_funds_input, submit_button], outputs=[plot])
36
 
37
- demo.load(create_portfolio_graph, inputs=[total_funds_input, submit_button], outputs=[title, plot])
38
 
39
  if __name__ == "__main__":
40
  demo.launch()
 
28
  # This is the Current Recommended Portfolio Allocation
29
  """
30
  )
31
+ total_funds_input = gr.Number("Type your total funds", elem_classes=["abc", "def"])
32
+ submit_button = gr.Button("Submit", elem_id="btn")
33
+ output = gr.Output() # Output component to capture the input value
34
 
35
  plot = gr.Plot(label="Portfolio Composition Chart")
36
+ plot.change(create_portfolio_graph, inputs=[total_funds_input, submit_button], outputs=[output])
37
 
38
+ demo.load(create_portfolio_graph, inputs=[total_funds_input, submit_button], outputs=[title, output, plot])
39
 
40
  if __name__ == "__main__":
41
  demo.launch()