WanIrfan commited on
Commit
19953c2
·
verified ·
1 Parent(s): 07e67e5

Update templates/medical_page.html

Browse files
Files changed (1) hide show
  1. templates/medical_page.html +35 -44
templates/medical_page.html CHANGED
@@ -188,7 +188,6 @@
188
  id="chat-history"
189
  class="max-w-5xl mx-auto px-4 py-8 pt-12 pb-40 space-y-8"
190
  >
191
- <!-- This is the welcome message -->
192
  {% if not history %}
193
  <div class="text-center py-10">
194
  <i
@@ -202,54 +201,46 @@
202
  for swarm analysis.
203
  </p>
204
  </div>
205
- {% endif %}
206
-
207
- <!-- This loops over all OLD messages -->
208
- {% for chat in history[:-1] %}
209
- {% if chat.type == 'human' %}
210
- <div class="flex justify-end w-full">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
  <div
212
- class="bg-primary-light text-white p-4 rounded-xl shadow-md max-w-2xl"
213
  >
214
- <p>
215
- {{ chat.content if chat.content is string else
216
- chat.content.content }}
217
- </p>
218
- {% if chat.content and '[Document Uploaded]' in chat.content %}<span
219
- class="text-xs text-blue-200 pt-2 block"
220
- ><i class="fas fa-file-alt mr-1"></i> Document Uploaded</span
221
- >{% endif %}
222
  </div>
223
- </div>
224
-
225
- {% elif chat.type == 'ai' %}
226
- <div class="w-full max-w-2xl space-y-4">
227
- {% set answer_text = chat.content %}
228
- <div>
229
- <div
230
- class="flex items-center text-sm text-gray-800 dark:text-white mb-2 ml-1"
231
- >
232
- <i
233
- class="fa-solid fa-file-medical text-primary-light dark:text-primary-dark mr-2"
234
- ></i>
235
- <strong class="font-semibold">MultiDom RAG</strong>
236
- </div>
237
- <div
238
- class="bg-white dark:bg-dark-700 border dark:border-dark-600 rounded-xl shadow-md p-5"
239
  >
240
- <p
241
- class="text-gray-800 dark:text-white whitespace-pre-wrap text-left"
242
- >
243
- {{ answer_text|safe }}
244
- </p>
245
- </div>
246
  </div>
247
  </div>
248
- {% endif %}
249
- {% endfor %}
250
-
251
- <!-- This block is ONLY for the NEWEST answer -->
252
- {% if answer %}
253
  <div class="w-full max-w-2xl space-y-4">
254
  <details class="w-full">
255
  <summary
@@ -513,4 +504,4 @@
513
  });
514
  </script>
515
  </body>
516
- </html>
 
188
  id="chat-history"
189
  class="max-w-5xl mx-auto px-4 py-8 pt-12 pb-40 space-y-8"
190
  >
 
191
  {% if not history %}
192
  <div class="text-center py-10">
193
  <i
 
201
  for swarm analysis.
202
  </p>
203
  </div>
204
+ {% endif %} {% for chat in history[:-1] %} {% if chat.type == 'human' %}
205
+ <div class="flex justify-end w-full">
206
+ <div
207
+ class="bg-primary-light text-white p-4 rounded-xl shadow-md max-w-2xl"
208
+ >
209
+ <p>
210
+ {{ chat.content if chat.content is string else
211
+ chat.content.content }}
212
+ </p>
213
+ {% if chat.content and '[Document Uploaded]' in chat.content %}<span
214
+ class="text-xs text-blue-200 pt-2 block"
215
+ ><i class="fas fa-file-alt mr-1"></i> Document Uploaded</span
216
+ >{% endif %}
217
+ </div>
218
+ </div>
219
+
220
+ {% elif chat.type == 'ai' %}
221
+ <div class="w-full max-w-2xl space-y-4">
222
+ {% set answer_text = chat.content %}
223
+ <div>
224
  <div
225
+ class="flex items-center text-sm text-gray-800 dark:text-white mb-2 ml-1"
226
  >
227
+ <i
228
+ class="fa-solid fa-file-medical text-primary-light dark:text-primary-dark mr-2"
229
+ ></i>
230
+ <strong class="font-semibold">MultiDom RAG</strong>
 
 
 
 
231
  </div>
232
+ <div
233
+ class="bg-white dark:bg-dark-700 border dark:border-dark-600 rounded-xl shadow-md p-5"
234
+ >
235
+ <p
236
+ class="text-gray-800 dark:text-white whitespace-pre-wrap text-left"
 
 
 
 
 
 
 
 
 
 
 
237
  >
238
+ {{ answer_text|safe }}
239
+ </p>
 
 
 
 
240
  </div>
241
  </div>
242
+ </div>
243
+ {% endif %} {% endfor %} {% if answer %}
 
 
 
244
  <div class="w-full max-w-2xl space-y-4">
245
  <details class="w-full">
246
  <summary
 
504
  });
505
  </script>
506
  </body>
507
+ </html>