Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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(
|
| 32 |
-
submit_button = gr.Button("Submit", elem_id="btn"
|
|
|
|
| 33 |
|
| 34 |
plot = gr.Plot(label="Portfolio Composition Chart")
|
| 35 |
-
plot.change(create_portfolio_graph, inputs=[total_funds_input, submit_button], outputs=[
|
| 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()
|