vermen commited on
Commit
37e383b
·
verified ·
1 Parent(s): 4d0f8f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -1,8 +1,12 @@
1
  from pathlib import Path
2
  import gradio as gr
 
3
 
4
  def upload_file(filepath):
5
  name = Path(filepath).name
 
 
 
6
  return [gr.UploadButton(visible=False), gr.DownloadButton(label=f"Download {name}", value=filepath, visible=True)]
7
 
8
  def download_file():
 
1
  from pathlib import Path
2
  import gradio as gr
3
+ import fitz
4
 
5
  def upload_file(filepath):
6
  name = Path(filepath).name
7
+ # load pdf
8
+ doc = fitz.open(filepath)
9
+ # now create the excel file
10
  return [gr.UploadButton(visible=False), gr.DownloadButton(label=f"Download {name}", value=filepath, visible=True)]
11
 
12
  def download_file():