Wanswan commited on
Commit
a8a4d3a
·
verified ·
1 Parent(s): b37884c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -80,7 +80,7 @@ async def respond(user_input, history, step, language, questions, followup_mode)
80
  return history, "", 1, user_language, translated_questions, False
81
  if step >= len(questions):
82
  thank_you = await gpt_translate("Thank you for your response!", language)
83
- end_note = await gpt_translate("This concludes our questions. Please proceed with the rest of the survey. 🗒️", language)
84
  history.append({"role": "assistant", "content": thank_you})
85
  history.append({"role": "assistant", "content": end_note})
86
  return history, "", step, language, questions, False
@@ -166,10 +166,9 @@ html, body {
166
  overflow: hidden !important;
167
  }
168
  #chatbox {
169
- height: calc(100vh - 100px) !important;
170
  overflow-y: auto !important;
171
- padding-bottom: 120px !important;
172
- margin-bottom: 100px !important;
173
  }
174
  .input-row {
175
  position: fixed !important;
@@ -217,7 +216,7 @@ footer, .icon-button-wrapper, label.svelte-1to105q {
217
  let attempts = 0;
218
  const maxAttempts = 10;
219
  const scroll = () => {
220
- chatbox.scrollTop = chatbox.scrollHeight + 150;
221
  attempts += 1;
222
  if (attempts < maxAttempts) {
223
  setTimeout(scroll, 100);
@@ -271,4 +270,4 @@ footer, .icon-button-wrapper, label.svelte-1to105q {
271
  send_btn.click(respond, [user_input, state, step, language, questions, followup_mode],
272
  [chatbot, user_input, step, language, questions, followup_mode])
273
 
274
- demo.queue().launch()
 
80
  return history, "", 1, user_language, translated_questions, False
81
  if step >= len(questions):
82
  thank_you = await gpt_translate("Thank you for your response!", language)
83
+ end_note = await gpt_translate("This concludes our questions. Please proceed with the rest of the survey. 📝", language)
84
  history.append({"role": "assistant", "content": thank_you})
85
  history.append({"role": "assistant", "content": end_note})
86
  return history, "", step, language, questions, False
 
166
  overflow: hidden !important;
167
  }
168
  #chatbox {
169
+ height: 100% !important;
170
  overflow-y: auto !important;
171
+ padding-bottom: 160px !important;
 
172
  }
173
  .input-row {
174
  position: fixed !important;
 
216
  let attempts = 0;
217
  const maxAttempts = 10;
218
  const scroll = () => {
219
+ chatbox.scrollTop = chatbox.scrollHeight + 200;
220
  attempts += 1;
221
  if (attempts < maxAttempts) {
222
  setTimeout(scroll, 100);
 
270
  send_btn.click(respond, [user_input, state, step, language, questions, followup_mode],
271
  [chatbot, user_input, step, language, questions, followup_mode])
272
 
273
+ demo.queue().launch()