Spaces:
Runtime error
Runtime error
Update app.py
Browse files63 unmodified lines64656667686970717273747563 unmodified linesplt.close() # Close the plot to free up memoryreturn fig@app.route('/plot')def get_plot():interest_rate_data, btc_prices = fetch_data()fig = plot_data(interest_rate_data, btc_prices)fig.savefig('plot.png')return send_file('plot.png', mimetype='image/png')if __name__ == '__main__':app.run(debug=True)63 unmodified lines646566676869707172737463 unmodified linesplt.close() # Close the plot to free up memoryreturn figdef run_app():interest_rate_data, btc_prices = fetch_data()return plot_data(interest_rate_data, btc_prices)iface = gr.Interface(fn=run_app, inputs=[], outputs="plot", title="Financial Data Comparison", live=True)if __name__ == "__main__":iface.launch(share=True)
app.py+6-7