Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -168,14 +168,14 @@ with gr.Blocks(css=".chatbox {height: 400px; overflow-y: auto; border: 1px solid
|
|
| 168 |
history, assistant_reply = respond(message, api_key, max_tokens, top_p, temperature)
|
| 169 |
full_history_html = render_message(history)
|
| 170 |
scroll_script = """
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
|
| 180 |
|
| 181 |
def regenerate_response(history, last_message, max_tokens, top_p, temperature):
|
|
|
|
| 168 |
history, assistant_reply = respond(message, api_key, max_tokens, top_p, temperature)
|
| 169 |
full_history_html = render_message(history)
|
| 170 |
scroll_script = """
|
| 171 |
+
<script>
|
| 172 |
+
setTimeout(() => {
|
| 173 |
+
const container = document.getElementById('chatbox-container');
|
| 174 |
+
container.scrollTop = container.scrollHeight;
|
| 175 |
+
}, 0);
|
| 176 |
+
</script>"""
|
| 177 |
+
|
| 178 |
+
return full_history_html + scroll_script, history, "", message
|
| 179 |
|
| 180 |
|
| 181 |
def regenerate_response(history, last_message, max_tokens, top_p, temperature):
|