Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ def process_file(file):
|
|
48 |
text += paragraph.text + "\n"
|
49 |
|
50 |
result = mitteilung(text)
|
51 |
-
|
52 |
return result
|
53 |
return text
|
54 |
#return [Document(text=text)]
|
@@ -56,11 +56,12 @@ def process_file(file):
|
|
56 |
with gr.Blocks() as demo:
|
57 |
gr.Markdown("### File upload", elem_classes="tab-header")
|
58 |
with gr.Row():
|
|
|
59 |
text_output = gr.Textbox(label="output")
|
60 |
with gr.Row():
|
61 |
file_input = gr.File(label="Wähle eine PDF-Datei aus", type="filepath")
|
62 |
with gr.Row():
|
63 |
submit_button = gr.Button("upload")
|
64 |
-
submit_button.click(process_file, inputs=file_input, outputs=
|
65 |
|
66 |
demo.launch()
|
|
|
48 |
text += paragraph.text + "\n"
|
49 |
|
50 |
result = mitteilung(text)
|
51 |
+
display(Markdown(result))
|
52 |
return result
|
53 |
return text
|
54 |
#return [Document(text=text)]
|
|
|
56 |
with gr.Blocks() as demo:
|
57 |
gr.Markdown("### File upload", elem_classes="tab-header")
|
58 |
with gr.Row():
|
59 |
+
textoutput = gr.Markdown()
|
60 |
text_output = gr.Textbox(label="output")
|
61 |
with gr.Row():
|
62 |
file_input = gr.File(label="Wähle eine PDF-Datei aus", type="filepath")
|
63 |
with gr.Row():
|
64 |
submit_button = gr.Button("upload")
|
65 |
+
submit_button.click(process_file, inputs=[file_input,text_output], outputs=textoutput)
|
66 |
|
67 |
demo.launch()
|