rukeshpaudel commited on
Commit
857b72e
Β·
1 Parent(s): 869bea0

utils added

Browse files
app.py CHANGED
@@ -29,31 +29,35 @@ def bot(history):
29
 
30
 
31
  with gr.Blocks() as demo:
32
- chatbot = gr.Chatbot(
33
- [],
34
- elem_id="chatbot",
35
- bubble_full_width=False,
36
- avatar_images=(None, "utils\images\health_assitant_chatbot_icon.png"),
37
- )
38
-
39
- with gr.Row():
40
- txt = gr.Textbox(
41
- scale=4,
42
- show_label=False,
43
- placeholder="Enter text and press enter, or upload an image",
44
- container=False,
45
  )
46
- btn = gr.UploadButton("πŸ“", file_types=["image", "video", "audio"])
47
 
48
- txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
49
- bot, chatbot, chatbot, api_name="bot_response"
50
- )
51
- txt_msg.then(lambda: gr.Textbox(interactive=True), None, [txt], queue=False)
52
- file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
53
- bot, chatbot, chatbot
54
- )
 
 
 
 
 
 
 
 
 
 
 
55
 
56
- chatbot.like(print_like_dislike, None, None)
 
57
 
58
 
59
  demo.queue()
 
29
 
30
 
31
  with gr.Blocks() as demo:
32
+ with gr.Tab("Chatbot"):
33
+ chatbot = gr.Chatbot(
34
+ [],
35
+ elem_id="chatbot",
36
+ bubble_full_width=False,
37
+ avatar_images=(None, "utils\images\health_assitant_chatbot_icon.png"),
 
 
 
 
 
 
 
38
  )
 
39
 
40
+ with gr.Row():
41
+ txt = gr.Textbox(
42
+ scale=4,
43
+ show_label=False,
44
+ placeholder="Enter text and press enter, or upload an image",
45
+ container=False,
46
+ )
47
+ btn = gr.UploadButton("πŸ“", file_types=["image", "video", "audio"])
48
+
49
+ txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
50
+ bot, chatbot, chatbot, api_name="bot_response"
51
+ )
52
+ txt_msg.then(lambda: gr.Textbox(interactive=True), None, [txt], queue=False)
53
+ file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
54
+ bot, chatbot, chatbot
55
+ )
56
+
57
+ chatbot.like(print_like_dislike, None, None)
58
 
59
+ with gr.Tab("Medical Report storage"):
60
+ with gr.Row("Upload your document here:"):
61
 
62
 
63
  demo.queue()
utils/chatbot.py ADDED
File without changes
utils/database_helper.py ADDED
File without changes
utils/medical_report_img.py ADDED
File without changes
utils/prompts.py ADDED
File without changes