mgokg commited on
Commit
657d295
·
verified ·
1 Parent(s): fc4d843

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -12
app.py CHANGED
@@ -35,16 +35,13 @@ def suchen():
35
  print("hallo")
36
  # Hier kannst du deine Suchfunktion implementieren return
37
 
38
- def main():
39
- gr.Interface(
40
- fn=suchen,
41
- #fn=process_pdf,
42
- inputs=[gr.File(type="filepath", label="PDF-Datei hochladen"),
43
- gr.Textbox(lines=2, placeholder="Stellen Sie eine Frage")],
44
- outputs="text",
45
- title="PDF-Chatbot",
46
- description="Laden Sie eine PDF-Datei hoch und stellen Sie Fragen zu ihrem Inhalt."
47
- ).launch()
48
 
49
- if __name__ == "__main__":
50
- main()
 
35
  print("hallo")
36
  # Hier kannst du deine Suchfunktion implementieren return
37
 
38
+ with gr.Blocks() as demo:
39
+ gr.Markdown("Start typing below and then click **Run** to see the output.")
40
+ with gr.Row():
41
+ inp = gr.Textbox(placeholder="What is your name?")
42
+ out = gr.Textbox()
43
+ file_inp = gr.File(type="filepath", label="PDF-Datei hochladen"),
44
+ btn = gr.Button("Run")
45
+ btn.click(fn=suchen, inputs=inp, outputs=out)
 
 
46
 
47
+ demo.launch()