itssarjunhere commited on
Commit
f8f2407
路
verified 路
1 Parent(s): 80aa266

Update templates/chat.html

Browse files
Files changed (1) hide show
  1. templates/chat.html +89 -46
templates/chat.html CHANGED
@@ -1,53 +1,89 @@
1
- <link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
2
- <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
3
- <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
4
-
5
  <!DOCTYPE html>
6
- <html>
7
  <head>
8
- <title>Chatbot</title>
9
- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
 
 
 
 
10
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
11
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
12
- <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css')}}"/>
13
  </head>
14
-
15
-
16
  <body>
17
- <div class="container-fluid h-100">
18
- <div class="row justify-content-center h-100">
19
- <div class="col-md-8 col-xl-6 chat">
20
- <div class="card">
21
- <div class="card-header msg_head">
22
- <div class="d-flex bd-highlight">
23
- <div class="img_cont">
24
- <img src="https://cdn-icons-png.flaticon.com/512/387/387569.png" class="rounded-circle user_img">
25
- <!-- <img src="https://www.prdistribution.com/spirit/uploads/pressreleases/2019/newsreleases/d83341deb75c4c4f6b113f27b1e42cd8-chatbot-florence-already-helps-thousands-of-patients-to-remember-their-medication.png" class="rounded-circle user_img"> -->
26
- <span class="online_icon"></span>
27
- </div>
28
- <div class="user_info">
29
- <span>Medical Chatbot</span>
30
- <p>Ask me anything!</p>
31
- </div>
32
- </div>
33
- </div>
34
- <div id="messageFormeight" class="card-body msg_card_body">
35
-
36
-
37
- </div>
38
- <div class="card-footer">
39
- <form id="messageArea" class="input-group">
40
- <input type="text" id="text" name="msg" placeholder="Type your message..." autocomplete="off" class="form-control type_msg" required/>
41
- <div class="input-group-append">
42
- <button type="submit" id="send" class="input-group-text send_btn"><i class="fas fa-location-arrow"></i></button>
43
- </div>
44
- </form>
45
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  </div>
47
  </div>
48
- </div>
 
 
 
 
 
 
 
 
49
  </div>
50
-
51
  <script>
52
  $(document).ready(function() {
53
  $("#messageArea").on("submit", function(event) {
@@ -57,10 +93,15 @@
57
  const str_time = hour+":"+minute;
58
  var rawText = $("#text").val();
59
 
60
- var userHtml = '<div class="d-flex justify-content-end mb-4"><div class="msg_cotainer_send">' + rawText + '<span class="msg_time_send">'+ str_time + '</span></div><div class="img_cont_msg"><img src="https://i.ibb.co/d5b84Xw/Untitled-design.png" class="rounded-circle user_img_msg"></div></div>';
61
-
62
  $("#text").val("");
63
  $("#messageFormeight").append(userHtml);
 
 
 
 
 
64
 
65
  $.ajax({
66
  data: {
@@ -69,13 +110,15 @@
69
  type: "POST",
70
  url: "/get",
71
  }).done(function(data) {
72
- var botHtml = '<div class="d-flex justify-content-start mb-4"><div class="img_cont_msg"><img src="https://cdn-icons-png.flaticon.com/512/387/387569.png" class="rounded-circle user_img_msg"></div><div class="msg_cotainer">' + data + '<span class="msg_time">' + str_time + '</span></div></div>';
 
73
  $("#messageFormeight").append($.parseHTML(botHtml));
 
74
  });
75
  event.preventDefault();
76
  });
77
  });
78
  </script>
79
-
80
- </body>
81
  </html>
 
 
 
 
 
1
  <!DOCTYPE html>
2
+ <html lang="en">
3
  <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Medibot 路 Medical Assistant</title>
7
+ <link rel="preconnect" href="https://fonts.googleapis.com">
8
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
+ <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
10
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
11
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
12
+ <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css')}}?v=7"/>
13
  </head>
14
+
 
15
  <body>
16
+ <div class="dashboard">
17
+
18
+ <!-- LEFT: brand / status panel -->
19
+ <aside class="panel">
20
+ <div class="panel_top">
21
+ <div class="brand">
22
+ <span class="brand_mark"><i class="fas fa-heartbeat"></i></span>
23
+ <span class="brand_name">Medi<span>bot</span></span>
24
+ </div>
25
+ </div>
26
+
27
+ <div class="panel_avatar">
28
+ <div class="avatar_ring">
29
+ <i class="fas fa-user-md avatar_img"></i>
30
+ <span class="avatar_status"></span>
31
+ </div>
32
+ <h2>Medibot Assistant</h2>
33
+ <p class="role">AI Medical Assistant</p>
34
+ <div class="status_chip"><span class="dot"></span>Online 路 Ready to help</div>
35
+ </div>
36
+
37
+ <p class="panel_desc">
38
+ Ask about symptoms, conditions, medications, or general health guidance. Responses are generated by an AI model trained on medical literature.
39
+ </p>
40
+
41
+ <div class="panel_stats">
42
+ <div class="stat">
43
+ <i class="fas fa-bolt"></i>
44
+ <div><span>Instant</span><small>Response time</small></div>
45
+ </div>
46
+ <div class="stat">
47
+ <i class="fas fa-shield-alt"></i>
48
+ <div><span>Private</span><small>No data stored</small></div>
49
+ </div>
50
+ </div>
51
+
52
+ <div class="panel_footer">
53
+ <i class="fas fa-exclamation-triangle"></i>
54
+ <span>Not a substitute for professional medical advice. In an emergency, contact a doctor.</span>
55
+ </div>
56
+ </aside>
57
+
58
+ <!-- RIGHT: chat area -->
59
+ <main class="chat">
60
+
61
+ <header class="chat_head">
62
+ <div class="chat_head_left">
63
+ <span>Conversation</span>
64
+ <p>Secure session 路 AI-generated responses</p>
65
+ </div>
66
+ <div class="chat_head_right"><i class="fas fa-ellipsis-v"></i></div>
67
+ </header>
68
+
69
+ <div id="messageFormeight" class="msg_card_body">
70
+ <div class="welcome_block">
71
+ <div class="welcome_icon"><i class="fas fa-stethoscope"></i></div>
72
+ <h3>Welcome to Medibot</h3>
73
+ <p>Start by describing your symptoms or asking a health-related question below.</p>
74
  </div>
75
  </div>
76
+
77
+ <div class="card-footer">
78
+ <form id="messageArea" class="input-group">
79
+ <input type="text" id="text" name="msg" placeholder="Describe your symptoms or ask a question..." autocomplete="off" class="type_msg" required/>
80
+ <button type="submit" id="send" class="send_btn"><i class="fas fa-paper-plane"></i></button>
81
+ </form>
82
+ </div>
83
+
84
+ </main>
85
  </div>
86
+
87
  <script>
88
  $(document).ready(function() {
89
  $("#messageArea").on("submit", function(event) {
 
93
  const str_time = hour+":"+minute;
94
  var rawText = $("#text").val();
95
 
96
+ var userHtml = '<div class="d-flex justify-content-end mb-4"><div class="msg_cotainer_send">' + rawText + '<span class="msg_time_send">'+ str_time + '</span></div><div class="img_cont_msg user_avatar"><i class="fas fa-user"></i></div></div>';
97
+
98
  $("#text").val("");
99
  $("#messageFormeight").append(userHtml);
100
+ $("#messageFormeight").scrollTop($("#messageFormeight")[0].scrollHeight);
101
+
102
+ var typingHtml = '<div class="d-flex justify-content-start mb-4 typing_row" id="typingIndicator"><div class="img_cont_msg bot_avatar"><i class="fas fa-user-md"></i></div><div class="msg_cotainer typing_dots"><span></span><span></span><span></span></div></div>';
103
+ $("#messageFormeight").append(typingHtml);
104
+ $("#messageFormeight").scrollTop($("#messageFormeight")[0].scrollHeight);
105
 
106
  $.ajax({
107
  data: {
 
110
  type: "POST",
111
  url: "/get",
112
  }).done(function(data) {
113
+ $("#typingIndicator").remove();
114
+ var botHtml = '<div class="d-flex justify-content-start mb-4"><div class="img_cont_msg bot_avatar"><i class="fas fa-user-md"></i></div><div class="msg_cotainer">' + data + '<span class="msg_time">' + str_time + '</span></div></div>';
115
  $("#messageFormeight").append($.parseHTML(botHtml));
116
+ $("#messageFormeight").scrollTop($("#messageFormeight")[0].scrollHeight);
117
  });
118
  event.preventDefault();
119
  });
120
  });
121
  </script>
122
+
123
+ </body>
124
  </html>