Daemontatox commited on
Commit
c91f5aa
·
verified ·
1 Parent(s): e232de0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -42
app.py CHANGED
@@ -315,45 +315,3 @@ if __name__ == "__main__":
315
  demo.launch()
316
 
317
 
318
- modify the send function and use the following asa reference :
319
-
320
-
321
-
322
- with gr.Blocks() as iface:
323
- gr.Image("Image.jpg", width=750, height=300, show_label=False, show_download_button=False)
324
- gr.Markdown("# Mawared HR Assistant 3.0.0")
325
- gr.Markdown('### Instructions')
326
- gr.Markdown("Ask a question about MawaredHR and get a detailed answer")
327
-
328
- chatbot = gr.Chatbot(
329
- height=750,
330
- show_label=False,
331
- bubble_full_width=False,
332
- )
333
-
334
- with gr.Row():
335
- with gr.Column(scale=20):
336
- question_input = gr.Textbox(
337
- label="Ask a question:",
338
- placeholder="Type your question here...",
339
- show_label=False
340
- )
341
- with gr.Column(scale=4):
342
- with gr.Row():
343
- with gr.Column():
344
- send_button = gr.Button("Send", variant="primary", size="sm")
345
- clear_button = gr.Button("Clear Chat", size="sm")
346
-
347
- # Handle both submit events (Enter key and Send button)
348
- submit_events = [question_input.submit, send_button.click]
349
- for submit_event in submit_events:
350
- submit_event(
351
- ask_question_gradio,
352
- inputs=[question_input, chatbot],
353
- outputs=[question_input, chatbot]
354
- )
355
-
356
- clear_button.click(
357
- clear_chat,
358
- outputs=[chatbot, question_input]
359
- )
 
315
  demo.launch()
316
 
317