Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,14 +28,11 @@ with gr.Blocks() as demo:
|
|
| 28 |
# This is the Current Recommended Portfolio Allocation
|
| 29 |
"""
|
| 30 |
)
|
| 31 |
-
total_funds_input = gr.Number(
|
| 32 |
-
|
| 33 |
-
output = gr.Output() # Output component to capture the input value
|
| 34 |
-
|
| 35 |
plot = gr.Plot(label="Portfolio Composition Chart")
|
| 36 |
-
|
| 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()
|
|
|
|
| 28 |
# This is the Current Recommended Portfolio Allocation
|
| 29 |
"""
|
| 30 |
)
|
| 31 |
+
total_funds_input = gr.Number(value=0)
|
| 32 |
+
button = gr.Button("Submit", elem_id="btn",elem_classes=["abc", "def"])
|
|
|
|
|
|
|
| 33 |
plot = gr.Plot(label="Portfolio Composition Chart")
|
| 34 |
+
button.change(create_portfolio_graph, inputs=button, outputs=[plot])
|
| 35 |
+
demo.load(create_portfolio_graph, inputs=[total_funds_input, button], outputs=[title, plot])
|
|
|
|
| 36 |
|
| 37 |
if __name__ == "__main__":
|
| 38 |
demo.launch()
|