Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -46,6 +46,7 @@ def create_excel(doc):
|
|
46 |
data[HEADERS[idx_col]].append(None)
|
47 |
idx_col = idx_col + 1
|
48 |
# SHOW THE RECOVERED DATA
|
|
|
49 |
df_table = pd.DataFrame.from_dict(data)
|
50 |
return (df_table.to_excel("tabla.xlsx", index=False))
|
51 |
|
@@ -53,8 +54,8 @@ def upload_file(filepath):
|
|
53 |
name = Path(filepath).name
|
54 |
# load pdf
|
55 |
doc = fitz.open(filepath)
|
56 |
-
print(doc)
|
57 |
df_table = create_excel(doc)
|
|
|
58 |
# now create the excel file
|
59 |
return [gr.UploadButton(visible=False), gr.DownloadButton(label=f"Download tabla.xlsx", value=df_table, visible=True)]
|
60 |
|
|
|
46 |
data[HEADERS[idx_col]].append(None)
|
47 |
idx_col = idx_col + 1
|
48 |
# SHOW THE RECOVERED DATA
|
49 |
+
print(data)
|
50 |
df_table = pd.DataFrame.from_dict(data)
|
51 |
return (df_table.to_excel("tabla.xlsx", index=False))
|
52 |
|
|
|
54 |
name = Path(filepath).name
|
55 |
# load pdf
|
56 |
doc = fitz.open(filepath)
|
|
|
57 |
df_table = create_excel(doc)
|
58 |
+
print(df_table)
|
59 |
# now create the excel file
|
60 |
return [gr.UploadButton(visible=False), gr.DownloadButton(label=f"Download tabla.xlsx", value=df_table, visible=True)]
|
61 |
|