mgokg commited on
Commit
d6fee21
·
verified ·
1 Parent(s): 41c15a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -10,15 +10,14 @@ def process_pdf(file):
10
  text += page.extract_text()
11
  return text
12
 
13
- with gr.Blocks() as demo:
14
  gr.Markdown("### File upload", elem_classes="tab-header")
15
  with gr.Row():
16
- text_output = gr.Textbox(label="text")
17
  file_input = gr.File(label="Wähle eine PDF-Datei aus", type="filepath")
18
  upload_output = gr.Textbox(label="Upload Status")
19
  with gr.Row():
20
  submit_button = gr.Button("upload")
21
- submit_button.click(process_pdf, inputs=file_input, outputs=text_output
22
 
23
- demo.launch())
24
-
 
10
  text += page.extract_text()
11
  return text
12
 
13
+ with gr.Blocks() as demo:
14
  gr.Markdown("### File upload", elem_classes="tab-header")
15
  with gr.Row():
16
+ text_output = gr.Textbox(label="text")
17
  file_input = gr.File(label="Wähle eine PDF-Datei aus", type="filepath")
18
  upload_output = gr.Textbox(label="Upload Status")
19
  with gr.Row():
20
  submit_button = gr.Button("upload")
21
+ submit_button.click(process_pdf, inputs=file_input, outputs=text_output)
22
 
23
+ demo.launch()