Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -64,12 +64,11 @@ def plot_data(interest_rate_data, btc_prices):
|
|
| 64 |
plt.close() # Close the plot to free up memory
|
| 65 |
return fig
|
| 66 |
|
| 67 |
-
|
| 68 |
-
def get_plot():
|
| 69 |
interest_rate_data, btc_prices = fetch_data()
|
| 70 |
-
|
| 71 |
-
fig.savefig('plot.png')
|
| 72 |
-
return send_file('plot.png', mimetype='image/png')
|
| 73 |
|
| 74 |
-
|
| 75 |
-
|
|
|
|
|
|
|
|
|
| 64 |
plt.close() # Close the plot to free up memory
|
| 65 |
return fig
|
| 66 |
|
| 67 |
+
def run_app():
|
|
|
|
| 68 |
interest_rate_data, btc_prices = fetch_data()
|
| 69 |
+
return plot_data(interest_rate_data, btc_prices)
|
|
|
|
|
|
|
| 70 |
|
| 71 |
+
iface = gr.Interface(fn=run_app, inputs=[], outputs="plot", title="Financial Data Comparison", live=True)
|
| 72 |
+
|
| 73 |
+
if __name__ == "__main__":
|
| 74 |
+
iface.launch(share=True)
|