Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ def create_portfolio_graph(amount):
|
|
| 8 |
short_position = 0.1 * amount
|
| 9 |
|
| 10 |
# Data for the bars
|
| 11 |
-
positions = ['Long', 'Short']
|
| 12 |
percentages = [long_position, short_position]
|
| 13 |
|
| 14 |
data = pd.DataFrame({'Position': positions, 'Percentage': percentages})
|
|
@@ -26,10 +26,10 @@ def create_portfolio_graph(amount):
|
|
| 26 |
with gr.Blocks() as demo:
|
| 27 |
title = gr.Markdown(
|
| 28 |
"""
|
| 29 |
-
# **
|
| 30 |
"""
|
| 31 |
)
|
| 32 |
-
amount = gr.Number(value=0, label="
|
| 33 |
button = gr.Button(value="Submit")
|
| 34 |
plot = gr.Plot(label="Portfolio Composition Chart")
|
| 35 |
demo.load(create_portfolio_graph, inputs=[amount], outputs=[plot])
|
|
|
|
| 8 |
short_position = 0.1 * amount
|
| 9 |
|
| 10 |
# Data for the bars
|
| 11 |
+
positions = ['This is your Long Position', 'This is your Short Position']
|
| 12 |
percentages = [long_position, short_position]
|
| 13 |
|
| 14 |
data = pd.DataFrame({'Position': positions, 'Percentage': percentages})
|
|
|
|
| 26 |
with gr.Blocks() as demo:
|
| 27 |
title = gr.Markdown(
|
| 28 |
"""
|
| 29 |
+
# ** Insert Portfolio Value and Click Submit to See the Recommended Portfolio Allocation **
|
| 30 |
"""
|
| 31 |
)
|
| 32 |
+
amount = gr.Number(value=0, label="Type in the total amount of funds in your portfolio including leverage")
|
| 33 |
button = gr.Button(value="Submit")
|
| 34 |
plot = gr.Plot(label="Portfolio Composition Chart")
|
| 35 |
demo.load(create_portfolio_graph, inputs=[amount], outputs=[plot])
|