yasserrmd commited on
Commit
64e9f52
·
verified ·
1 Parent(s): e076004

Update static/index.html

Browse files
Files changed (1) hide show
  1. static/index.html +5 -5
static/index.html CHANGED
@@ -3,7 +3,7 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>AI Gratitude Journal 2030</title>
7
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.1/font/bootstrap-icons.min.css">
8
  <style>
9
  :root {
@@ -406,15 +406,15 @@ document.addEventListener('DOMContentLoaded', () => {
406
  addMessage(htmlContent, 'ai', true);
407
  } else if (message.type === 'image') {
408
  const img = document.createElement('img');
409
- const messageDiv = document.createElement('div');
410
- messageDiv.className = `message img`;
411
  if (img){
412
  img.src = `data:image/png;base64,${message.image}`; // Set Base64 as the image source
413
  img.alt = 'Generated Image';
414
  img.style.width = '100%';
415
 
416
- messageDiv.appendChild(img);
417
- messages.appendChild(messageDiv);
418
  } else{
419
  const htmlContent = "The generated image might be inappropraite"; // Convert markdown to HTML
420
  addMessage(htmlContent, 'ai', true);
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>AI Gratitude Journal</title>
7
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.1/font/bootstrap-icons.min.css">
8
  <style>
9
  :root {
 
406
  addMessage(htmlContent, 'ai', true);
407
  } else if (message.type === 'image') {
408
  const img = document.createElement('img');
409
+ const imgDiv = document.createElement('div');
410
+ imgDiv.className = `message img`;
411
  if (img){
412
  img.src = `data:image/png;base64,${message.image}`; // Set Base64 as the image source
413
  img.alt = 'Generated Image';
414
  img.style.width = '100%';
415
 
416
+ imgDiv.appendChild(img);
417
+ messages.appendChild(imgDiv);
418
  } else{
419
  const htmlContent = "The generated image might be inappropraite"; // Convert markdown to HTML
420
  addMessage(htmlContent, 'ai', true);