Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -80,7 +80,7 @@ def get_excel_files(folder):
|
|
| 80 |
|
| 81 |
def get_sheet_names(file):
|
| 82 |
xls = pd.ExcelFile(os.path.join(PDF_FOLDER, file))
|
| 83 |
-
return xls.sheet_names
|
| 84 |
|
| 85 |
def process_and_compare(file1, sheet1, file2, sheet2):
|
| 86 |
def process_file(file_path, sheet_name):
|
|
@@ -236,7 +236,6 @@ with gr.Blocks() as demo:
|
|
| 236 |
return get_sheet_names(file)
|
| 237 |
|
| 238 |
file1.change(fn=update_sheets, inputs=file1, outputs=sheet)
|
| 239 |
-
file2.change(fn=update_sheets, inputs=file2, outputs=sheet)
|
| 240 |
|
| 241 |
b1 = gr.Button("Compare Data")
|
| 242 |
b1.click(fn=process_and_compare, inputs=[file1, sheet, file2, sheet], outputs=result)
|
|
|
|
| 80 |
|
| 81 |
def get_sheet_names(file):
|
| 82 |
xls = pd.ExcelFile(os.path.join(PDF_FOLDER, file))
|
| 83 |
+
return gr.update(choices=xls.sheet_names)
|
| 84 |
|
| 85 |
def process_and_compare(file1, sheet1, file2, sheet2):
|
| 86 |
def process_file(file_path, sheet_name):
|
|
|
|
| 236 |
return get_sheet_names(file)
|
| 237 |
|
| 238 |
file1.change(fn=update_sheets, inputs=file1, outputs=sheet)
|
|
|
|
| 239 |
|
| 240 |
b1 = gr.Button("Compare Data")
|
| 241 |
b1.click(fn=process_and_compare, inputs=[file1, sheet, file2, sheet], outputs=result)
|