Cachoups commited on
Commit
8a806ce
·
verified ·
1 Parent(s): b2ec946

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -234,7 +234,14 @@ def process_and_compare(file1, sheet1, file2, sheet2):
234
  plt.savefig(file_path, format='png', bbox_inches='tight')
235
  plt.close()
236
 
237
- return merged_df, gr.update(choices=stored_df1.Country.values.tolist()), gr.update(choices=stored_df2.Country.values.tolist())
 
 
 
 
 
 
 
238
 
239
  def find_sentences_with_keywords(text, keywords):
240
  # Split text into sentences using regular expression to match sentence-ending punctuation
 
234
  plt.savefig(file_path, format='png', bbox_inches='tight')
235
  plt.close()
236
 
237
+ return gr.BarPlot(
238
+ merged_df,
239
+ x="Country",
240
+ y="Difference adverse cumulative growth",
241
+ color="Country",
242
+ x_bin=1,
243
+ title = f'Histogram of Difference between Adverse cumulative growth of {year2} and {year1} for {sheet1}'
244
+ ), gr.update(choices=stored_df1.Country.values.tolist()), gr.update(choices=stored_df2.Country.values.tolist())
245
 
246
  def find_sentences_with_keywords(text, keywords):
247
  # Split text into sentences using regular expression to match sentence-ending punctuation