miyukicodes commited on
Commit
c7d4122
·
verified ·
1 Parent(s): f8d0ea3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -139,7 +139,7 @@ def carbon_trend():
139
  plt.title("Carbon Intensity Trend")
140
  plt.legend()
141
  plt.tight_layout()
142
- plt.savefig("carbon_trend_plot.png")
143
 
144
  return {
145
  "trend_slope": round(slope, 4),
@@ -153,4 +153,4 @@ def carbon_trend():
153
  # Optional: Return trend plot image
154
  @app.get("/carbon-trend/plot")
155
  def get_trend_plot():
156
- return FileResponse("carbon_trend_plot.png", media_type="image/png")
 
139
  plt.title("Carbon Intensity Trend")
140
  plt.legend()
141
  plt.tight_layout()
142
+ plt.savefig("/tmp/carbon_trend_plot.png")
143
 
144
  return {
145
  "trend_slope": round(slope, 4),
 
153
  # Optional: Return trend plot image
154
  @app.get("/carbon-trend/plot")
155
  def get_trend_plot():
156
+ return FileResponse("/tmp/carbon_trend_plot.png", media_type="image/png")