Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -234,14 +234,7 @@ def process_and_compare(file1, sheet1, file2, sheet2):
|
|
| 234 |
plt.savefig(file_path, format='png', bbox_inches='tight')
|
| 235 |
plt.close()
|
| 236 |
|
| 237 |
-
return gr.
|
| 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
|
|
@@ -561,8 +554,8 @@ with gr.Blocks(theme='gradio/soft',js=js_func) as demo:
|
|
| 561 |
sheet = gr.Dropdown(choices=["GDP", "HICP", "RRE prices", "Unemployment", "CRE prices"], label="Select Sheet for File 1 and 2")
|
| 562 |
|
| 563 |
with gr.Column():
|
| 564 |
-
|
| 565 |
-
result = gr.BarPlot()
|
| 566 |
def update_sheets(file):
|
| 567 |
return get_sheet_names(file)
|
| 568 |
|
|
|
|
| 234 |
plt.savefig(file_path, format='png', bbox_inches='tight')
|
| 235 |
plt.close()
|
| 236 |
|
| 237 |
+
return file_path, 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
|
|
|
|
| 554 |
sheet = gr.Dropdown(choices=["GDP", "HICP", "RRE prices", "Unemployment", "CRE prices"], label="Select Sheet for File 1 and 2")
|
| 555 |
|
| 556 |
with gr.Column():
|
| 557 |
+
result = gr.Image(label="Comparison Plot")
|
| 558 |
+
#result = gr.BarPlot()
|
| 559 |
def update_sheets(file):
|
| 560 |
return get_sheet_names(file)
|
| 561 |
|