Spaces:
Sleeping
Sleeping
Diego Salinas commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,9 +27,10 @@ def create_portfolio_graph():
|
|
| 27 |
# Return the image as a NumPy array
|
| 28 |
return np.array(plt.imread("/mnt/data/portfolio_chart.png"))
|
| 29 |
|
| 30 |
-
# Gradio Interface (
|
| 31 |
iface = gr.Interface(
|
| 32 |
fn=create_portfolio_graph,
|
|
|
|
| 33 |
outputs=gr.Image(type="numpy", label="Portfolio Composition Chart"),
|
| 34 |
live=True,
|
| 35 |
capture_session=True
|
|
@@ -45,3 +46,4 @@ iface.launch()
|
|
| 45 |
|
| 46 |
|
| 47 |
|
|
|
|
|
|
| 27 |
# Return the image as a NumPy array
|
| 28 |
return np.array(plt.imread("/mnt/data/portfolio_chart.png"))
|
| 29 |
|
| 30 |
+
# Gradio Interface (with a dummy input)
|
| 31 |
iface = gr.Interface(
|
| 32 |
fn=create_portfolio_graph,
|
| 33 |
+
inputs=[gr.Textbox()],
|
| 34 |
outputs=gr.Image(type="numpy", label="Portfolio Composition Chart"),
|
| 35 |
live=True,
|
| 36 |
capture_session=True
|
|
|
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
+
|