RomZay commited on
Commit
85e9511
·
verified ·
1 Parent(s): 19c4786

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -123,11 +123,14 @@ def render_message(history):
123
  </div>
124
  </div>
125
  <script>
126
- function scrollToBottom() {
127
  var chatbox = document.getElementById('chatbox-container');
128
- chatbox.scrollTop = chatbox.scrollHeight;
129
  }
130
- scrollToBottom();
 
 
 
131
  </script>
132
  """
133
 
 
123
  </div>
124
  </div>
125
  <script>
126
+ function scrollToBottom() {
127
  var chatbox = document.getElementById('chatbox-container');
128
+ chatbox.scrollTop = chatbox.scrollHeight;
129
  }
130
+ window.onload = function() {
131
+ scrollToBottom();
132
+ };
133
+ setTimeout(scrollToBottom, 0);
134
  </script>
135
  """
136