Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,14 +59,13 @@ def plot_crypto_price(crypto):
|
|
| 59 |
plt.legend()
|
| 60 |
plt.grid()
|
| 61 |
|
| 62 |
-
plt.
|
| 63 |
-
return "crypto_plot.png"
|
| 64 |
|
| 65 |
# Create Gradio Interface
|
| 66 |
demo = gr.Interface(
|
| 67 |
fn=plot_crypto_price,
|
| 68 |
inputs=gr.Dropdown(choices=cryptos, label="Select Cryptocurrency"),
|
| 69 |
-
outputs=gr.
|
| 70 |
title="Cryptocurrency Price Visualization",
|
| 71 |
description="Select a cryptocurrency to view its historical price data over the past year."
|
| 72 |
)
|
|
|
|
| 59 |
plt.legend()
|
| 60 |
plt.grid()
|
| 61 |
|
| 62 |
+
return plt.gcf()
|
|
|
|
| 63 |
|
| 64 |
# Create Gradio Interface
|
| 65 |
demo = gr.Interface(
|
| 66 |
fn=plot_crypto_price,
|
| 67 |
inputs=gr.Dropdown(choices=cryptos, label="Select Cryptocurrency"),
|
| 68 |
+
outputs=gr.Plot(label="Price Chart"),
|
| 69 |
title="Cryptocurrency Price Visualization",
|
| 70 |
description="Select a cryptocurrency to view its historical price data over the past year."
|
| 71 |
)
|