youngtsai commited on
Commit
269bb11
·
1 Parent(s): 2ac9392

scroll_to_output=True

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -2641,7 +2641,7 @@ with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.orange, seconda
2641
  key_moments_state = gr.State() # 使用 gr.State 存储 key_moments
2642
  streaming_chat_thread_id_state = gr.State() # 使用 gr.State 存储 streaming_chat_thread_id
2643
  with gr.Tab("AI小精靈"):
2644
- with gr.Accordion("選擇 AI 小精靈", open=True) as chatbot_select_accordion:
2645
  with gr.Row():
2646
  user_avatar = "https://em-content.zobj.net/source/google/263/flushed-face_1f633.png"
2647
  ai_chatbot_bot_avatar = "https://junyitopicimg.s3.amazonaws.com/s4byy--icon.jpe?v=20200513013523726"
@@ -3003,7 +3003,8 @@ with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.orange, seconda
3003
  ).then(
3004
  update_avatar_images,
3005
  inputs=[foxcat_avatar_images, foxcat_chatbot_description_value],
3006
- outputs=[ai_chatbot]
 
3007
  )
3008
  lili_chatbot_select_btn.click(
3009
  chatbot_select,
@@ -3012,7 +3013,8 @@ with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.orange, seconda
3012
  ).then(
3013
  update_avatar_images,
3014
  inputs=[lili_avatar_images, lili_chatbot_description_value],
3015
- outputs=[ai_chatbot]
 
3016
  )
3017
  maimai_chatbot_select_btn.click(
3018
  chatbot_select,
@@ -3021,7 +3023,8 @@ with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.orange, seconda
3021
  ).then(
3022
  update_avatar_images,
3023
  inputs=[maimai_avatar_images, maimai_chatbot_description_value],
3024
- outputs=[ai_chatbot]
 
3025
  )
3026
 
3027
  # OPENAI ASSISTANT CHATBOT 模式
 
2641
  key_moments_state = gr.State() # 使用 gr.State 存储 key_moments
2642
  streaming_chat_thread_id_state = gr.State() # 使用 gr.State 存储 streaming_chat_thread_id
2643
  with gr.Tab("AI小精靈"):
2644
+ with gr.Accordion("選擇 AI 小精靈") as chatbot_select_accordion:
2645
  with gr.Row():
2646
  user_avatar = "https://em-content.zobj.net/source/google/263/flushed-face_1f633.png"
2647
  ai_chatbot_bot_avatar = "https://junyitopicimg.s3.amazonaws.com/s4byy--icon.jpe?v=20200513013523726"
 
3003
  ).then(
3004
  update_avatar_images,
3005
  inputs=[foxcat_avatar_images, foxcat_chatbot_description_value],
3006
+ outputs=[ai_chatbot],
3007
+ scroll_to_output=True
3008
  )
3009
  lili_chatbot_select_btn.click(
3010
  chatbot_select,
 
3013
  ).then(
3014
  update_avatar_images,
3015
  inputs=[lili_avatar_images, lili_chatbot_description_value],
3016
+ outputs=[ai_chatbot],
3017
+ scroll_to_output=True
3018
  )
3019
  maimai_chatbot_select_btn.click(
3020
  chatbot_select,
 
3023
  ).then(
3024
  update_avatar_images,
3025
  inputs=[maimai_avatar_images, maimai_chatbot_description_value],
3026
+ outputs=[ai_chatbot],
3027
+ scroll_to_output=True
3028
  )
3029
 
3030
  # OPENAI ASSISTANT CHATBOT 模式