akhaliq HF Staff commited on
Commit
6b5a1a8
·
1 Parent(s): 5d38780
Files changed (1) hide show
  1. app.py +7 -14
app.py CHANGED
@@ -7884,7 +7884,6 @@ with gr.Blocks(
7884
  show_label=False,
7885
  height=320,
7886
  layout="bubble",
7887
- bubble_full_width=True,
7888
  group_consecutive_messages=True,
7889
  visible=False,
7890
  elem_id="beta_chat"
@@ -8743,7 +8742,7 @@ with gr.Blocks(
8743
  show_progress="hidden",
8744
  ).then(
8745
  generation_code,
8746
- inputs=[input, image_input, generation_image_input, file_input, website_url_input, setting, history, current_model, search_toggle, language_dropdown, provider_state, image_generation_toggle, image_to_image_toggle, image_to_image_prompt, text_to_image_prompt, image_to_video_toggle, image_to_video_prompt, text_to_video_toggle, text_to_video_prompt, video_to_video_toggle, video_to_video_prompt, video_input, text_to_music_toggle, text_to_music_prompt, image_video_to_animation_toggle, animation_mode_dropdown, animation_quality_dropdown, animation_video_input, login_button, login_button],
8747
  outputs=[code_output, history, sandbox, history_output]
8748
  ).then(
8749
  end_generation_ui,
@@ -8784,7 +8783,7 @@ with gr.Blocks(
8784
  show_progress="hidden",
8785
  ).then(
8786
  generation_code,
8787
- inputs=[input, image_input, generation_image_input, file_input, website_url_input, setting, history, current_model, search_toggle, language_dropdown, provider_state, image_generation_toggle, image_to_image_toggle, image_to_image_prompt, text_to_image_prompt, image_to_video_toggle, image_to_video_prompt, text_to_video_toggle, text_to_video_prompt, video_to_video_toggle, video_to_video_prompt, video_input, text_to_music_toggle, text_to_music_prompt, login_button, login_button],
8788
  outputs=[code_output, history, sandbox, history_output]
8789
  ).then(
8790
  end_generation_ui,
@@ -9057,7 +9056,7 @@ with gr.Blocks(
9057
  show_progress="hidden",
9058
  ).then(
9059
  generation_code,
9060
- inputs=[input, image_input, generation_image_input, file_input, website_url_input, setting, history, current_model, search_toggle, language_dropdown, provider_state, image_generation_toggle, image_to_image_toggle, image_to_image_prompt, text_to_image_prompt, image_to_video_toggle, image_to_video_prompt, text_to_video_toggle, text_to_video_prompt, video_to_video_toggle, video_to_video_prompt, video_input, text_to_music_toggle, text_to_music_prompt, image_video_to_animation_toggle, animation_mode_dropdown, animation_quality_dropdown, animation_video_input, login_button, login_button],
9061
  outputs=[code_output, history, sandbox, history_output]
9062
  ).then(
9063
  end_generation_ui,
@@ -9818,17 +9817,11 @@ with gr.Blocks(
9818
  # Keep the old deploy method as fallback (if not logged in, user can still use the old method)
9819
  # Optionally, you can keep the old deploy_btn.click for the default method as a secondary button.
9820
 
9821
- # Handle login status changes to update UI
9822
- login_button.login(
 
9823
  update_ui_for_auth_status,
9824
- inputs=[login_button, login_button],
9825
- outputs=[input, btn, auth_status],
9826
- queue=False
9827
- )
9828
-
9829
- login_button.logout(
9830
- update_ui_for_auth_status,
9831
- inputs=[login_button, login_button],
9832
  outputs=[input, btn, auth_status],
9833
  queue=False
9834
  )
 
7884
  show_label=False,
7885
  height=320,
7886
  layout="bubble",
 
7887
  group_consecutive_messages=True,
7888
  visible=False,
7889
  elem_id="beta_chat"
 
8742
  show_progress="hidden",
8743
  ).then(
8744
  generation_code,
8745
+ inputs=[input, image_input, generation_image_input, file_input, website_url_input, setting, history, current_model, search_toggle, language_dropdown, provider_state, image_generation_toggle, image_to_image_toggle, image_to_image_prompt, text_to_image_prompt, image_to_video_toggle, image_to_video_prompt, text_to_video_toggle, text_to_video_prompt, video_to_video_toggle, video_to_video_prompt, video_input, text_to_music_toggle, text_to_music_prompt, image_video_to_animation_toggle, animation_mode_dropdown, animation_quality_dropdown, animation_video_input],
8746
  outputs=[code_output, history, sandbox, history_output]
8747
  ).then(
8748
  end_generation_ui,
 
8783
  show_progress="hidden",
8784
  ).then(
8785
  generation_code,
8786
+ inputs=[input, image_input, generation_image_input, file_input, website_url_input, setting, history, current_model, search_toggle, language_dropdown, provider_state, image_generation_toggle, image_to_image_toggle, image_to_image_prompt, text_to_image_prompt, image_to_video_toggle, image_to_video_prompt, text_to_video_toggle, text_to_video_prompt, video_to_video_toggle, video_to_video_prompt, video_input, text_to_music_toggle, text_to_music_prompt],
8787
  outputs=[code_output, history, sandbox, history_output]
8788
  ).then(
8789
  end_generation_ui,
 
9056
  show_progress="hidden",
9057
  ).then(
9058
  generation_code,
9059
+ inputs=[input, image_input, generation_image_input, file_input, website_url_input, setting, history, current_model, search_toggle, language_dropdown, provider_state, image_generation_toggle, image_to_image_toggle, image_to_image_prompt, text_to_image_prompt, image_to_video_toggle, image_to_video_prompt, text_to_video_toggle, text_to_video_prompt, video_to_video_toggle, video_to_video_prompt, video_input, text_to_music_toggle, text_to_music_prompt, image_video_to_animation_toggle, animation_mode_dropdown, animation_quality_dropdown, animation_video_input],
9060
  outputs=[code_output, history, sandbox, history_output]
9061
  ).then(
9062
  end_generation_ui,
 
9817
  # Keep the old deploy method as fallback (if not logged in, user can still use the old method)
9818
  # Optionally, you can keep the old deploy_btn.click for the default method as a secondary button.
9819
 
9820
+ # Handle login/logout button clicks to update UI
9821
+ # The LoginButton automatically handles OAuth flow, we just need to update UI on click
9822
+ login_button.click(
9823
  update_ui_for_auth_status,
9824
+ inputs=[],
 
 
 
 
 
 
 
9825
  outputs=[input, btn, auth_status],
9826
  queue=False
9827
  )