Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -172,14 +172,14 @@ with gr.Blocks(css=".chatbox {height: 400px; overflow-y: auto; border: 1px solid
|
|
| 172 |
full_history_html = render_message(history)
|
| 173 |
|
| 174 |
scroll_script = """
|
| 175 |
-
|
| 176 |
-
|
| 177 |
const container = document.getElementById('chatbox-container');
|
| 178 |
container.scrollTop = container.scrollHeight; // Scroll to the bottom
|
| 179 |
-
|
| 180 |
-
|
| 181 |
|
| 182 |
-
|
| 183 |
|
| 184 |
|
| 185 |
|
|
|
|
| 172 |
full_history_html = render_message(history)
|
| 173 |
|
| 174 |
scroll_script = """
|
| 175 |
+
<script>
|
| 176 |
+
window.onload = function() {
|
| 177 |
const container = document.getElementById('chatbox-container');
|
| 178 |
container.scrollTop = container.scrollHeight; // Scroll to the bottom
|
| 179 |
+
};
|
| 180 |
+
</script>"""
|
| 181 |
|
| 182 |
+
return full_history_html + scroll_script, history, "", message
|
| 183 |
|
| 184 |
|
| 185 |
|