Cachoups commited on
Commit
8ccce28
·
verified ·
1 Parent(s): 6d27c94

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -145,14 +145,12 @@ def process_and_compare(file1, sheet1, file2, sheet2):
145
  ax.set_ylabel('Difference')
146
  plt.xticks(rotation=90)
147
 
148
- # Save plot to BytesIO object
149
- buf = io.BytesIO()
150
- plt.savefig(buf, format='png', bbox_inches='tight')
151
- buf.seek(0)
152
- img = buf.getvalue()
153
- buf.close()
154
-
155
- return img
156
 
157
 
158
  stored_paragraphs_1 = []
 
145
  ax.set_ylabel('Difference')
146
  plt.xticks(rotation=90)
147
 
148
+ # Save plot to a file
149
+ file_path = '/output/plot.png'
150
+ plt.savefig(file_path, format='png', bbox_inches='tight')
151
+ plt.close()
152
+
153
+ return file_path
 
 
154
 
155
 
156
  stored_paragraphs_1 = []