mgokg commited on
Commit
43913a7
·
verified ·
1 Parent(s): 23f6e85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -113,30 +113,38 @@ def search_similar_documents(prompt):
113
 
114
  with gr.Blocks() as chat:
115
  gr.Markdown("### Ask the RKI Files", elem_classes="tab-header")
 
116
  with gr.Row():
117
  llm_output = gr.Textbox(label="LLM Answer")
118
  with gr.Row():
119
  llm_prompt_input = gr.Textbox(label="Frage an das LLM", placeholder="Gib eine Frage ein")
120
- llm_submit_button = gr.Button("send")
 
 
121
  llm_submit_button.click(ask_llm, inputs=llm_prompt_input, outputs=llm_output)
122
 
123
  with gr.Blocks() as upload:
124
  gr.Markdown("### File upload", elem_classes="tab-header")
 
125
  with gr.Row():
126
- file_input = gr.File(label="Wähle eine PDF-Datei aus", type="filepath")
127
- upload_output = gr.Textbox(label="Upload Status")
 
128
  with gr.Row():
129
  submit_button = gr.Button("upload")
 
130
  submit_button.click(process_pdf, inputs=file_input, outputs=upload_output)
131
 
132
  with gr.Blocks() as suche:
133
  gr.Markdown("### Datenbank durchsuchen", elem_classes="tab-header")
 
134
  with gr.Row():
135
  prompt_input = gr.Textbox(label="Suche nach ähnlichen Dokumenten", placeholder="Gib einen Suchbegriff ein")
136
  with gr.Row():
137
  search_output = gr.Textbox(label="Ähnliche Dokumente")
138
  with gr.Row():
139
  search_button = gr.Button("Suchen")
 
140
  search_button.click(search_similar_documents, inputs=prompt_input, outputs=search_output)
141
 
142
  #optional, Spracheingabe
 
113
 
114
  with gr.Blocks() as chat:
115
  gr.Markdown("### Ask the RKI Files", elem_classes="tab-header")
116
+
117
  with gr.Row():
118
  llm_output = gr.Textbox(label="LLM Answer")
119
  with gr.Row():
120
  llm_prompt_input = gr.Textbox(label="Frage an das LLM", placeholder="Gib eine Frage ein")
121
+ with gr.Row():
122
+ llm_submit_button = gr.Button("send")
123
+
124
  llm_submit_button.click(ask_llm, inputs=llm_prompt_input, outputs=llm_output)
125
 
126
  with gr.Blocks() as upload:
127
  gr.Markdown("### File upload", elem_classes="tab-header")
128
+
129
  with gr.Row():
130
+ upload_output = gr.Textbox(label="Upload Status")
131
+ with gr.Row():
132
+ file_input = gr.File(label="Wähle eine PDF-Datei aus", type="filepath")
133
  with gr.Row():
134
  submit_button = gr.Button("upload")
135
+
136
  submit_button.click(process_pdf, inputs=file_input, outputs=upload_output)
137
 
138
  with gr.Blocks() as suche:
139
  gr.Markdown("### Datenbank durchsuchen", elem_classes="tab-header")
140
+
141
  with gr.Row():
142
  prompt_input = gr.Textbox(label="Suche nach ähnlichen Dokumenten", placeholder="Gib einen Suchbegriff ein")
143
  with gr.Row():
144
  search_output = gr.Textbox(label="Ähnliche Dokumente")
145
  with gr.Row():
146
  search_button = gr.Button("Suchen")
147
+
148
  search_button.click(search_similar_documents, inputs=prompt_input, outputs=search_output)
149
 
150
  #optional, Spracheingabe