@@ -396,7 +396,7 @@ def _generate_default_ui(
396396 track_constraints = self .track_constraints ,
397397 mode = "receive" ,
398398 modality = "video" ,
399- full_screen = ui_args .get ("full_screen" ),
399+ full_screen = ui_args .get ("full_screen" , False ),
400400 )
401401 self .webrtc_component = output_video
402402 for component in additional_output_components :
@@ -440,7 +440,7 @@ def _generate_default_ui(
440440 track_constraints = self .track_constraints ,
441441 mode = "send" ,
442442 modality = "video" ,
443- full_screen = ui_args .get ("full_screen" ),
443+ full_screen = ui_args .get ("full_screen" , False ),
444444 )
445445 self .webrtc_component = output_video
446446 for component in additional_output_components :
@@ -463,7 +463,7 @@ def _generate_default_ui(
463463 outputs = additional_output_components ,
464464 )
465465 elif self .modality == "video" and self .mode == "send-receive" :
466- if ui_args .get ("full_screen" ) is False :
466+ if ui_args .get ("full_screen" , False ) is False :
467467 css = """.my-column {display: flex !important; justify-content: center !important; align-items: center !important};"""
468468 else :
469469 css = """.gradio-container .sidebar {background-color: color-mix(in srgb, var(--block-background-fill) 50%, transparent) !important;}
@@ -482,9 +482,9 @@ def _generate_default_ui(
482482 track_constraints = self .track_constraints ,
483483 mode = "send-receive" ,
484484 modality = "video" ,
485- full_screen = ui_args .get ("full_screen" ),
485+ full_screen = ui_args .get ("full_screen" , False ),
486486 )
487- if ui_args .get ("full_screen" ) is False :
487+ if ui_args .get ("full_screen" , False ) is False :
488488 for component in additional_input_components :
489489 component .render ()
490490 if additional_input_components :
@@ -495,13 +495,13 @@ def _generate_default_ui(
495495 ]
496496 if (
497497 input_components_to_render
498- and ui_args .get ("full_screen" ) is not False
498+ and ui_args .get ("full_screen" , False ) is not False
499499 ):
500500 with gr .Sidebar (position = "left" ):
501501 for component in input_components_to_render :
502502 component .render ()
503503 if additional_output_components :
504- if ui_args .get ("full_screen" ) is False :
504+ if ui_args .get ("full_screen" , False ) is False :
505505 with gr .Group ():
506506 for component in additional_output_components :
507507 if component not in same_components :
@@ -553,7 +553,7 @@ def _generate_default_ui(
553553 icon_button_color = ui_args .get ("icon_button_color" ),
554554 pulse_color = ui_args .get ("pulse_color" ),
555555 icon_radius = ui_args .get ("icon_radius" ),
556- full_screen = ui_args .get ("full_screen" ),
556+ full_screen = ui_args .get ("full_screen" , False ),
557557 )
558558 self .webrtc_component = output_video
559559 for component in additional_output_components :
@@ -612,7 +612,7 @@ def _generate_default_ui(
612612 pulse_color = ui_args .get ("pulse_color" ),
613613 icon_radius = ui_args .get ("icon_radius" ),
614614 variant = ui_args .get ("variant" , "wave" ),
615- full_screen = ui_args .get ("full_screen" ),
615+ full_screen = ui_args .get ("full_screen" , False ),
616616 )
617617 else :
618618 with gr .Row ():
@@ -629,7 +629,7 @@ def _generate_default_ui(
629629 pulse_color = ui_args .get ("pulse_color" ),
630630 icon_radius = ui_args .get ("icon_radius" ),
631631 variant = ui_args .get ("variant" , "wave" ),
632- full_screen = ui_args .get ("full_screen" ),
632+ full_screen = ui_args .get ("full_screen" , False ),
633633 )
634634 for component in additional_input_components :
635635 if component not in same_components :
@@ -664,7 +664,9 @@ def _generate_default_ui(
664664 chatbot_component = component
665665 break
666666
667- use_component_layout = ui_args .get ("full_screen" ) is False or has_chatbot
667+ use_component_layout = (
668+ ui_args .get ("full_screen" , False ) is False or has_chatbot
669+ )
668670 if use_component_layout :
669671 css = """.my-group {max-width: 600px !important; max-height: 600 !important;}
670672 .my-column {display: flex !important; justify-content: center !important; align-items: center !important};"""
@@ -791,7 +793,7 @@ def _generate_default_ui(
791793 concurrency_limit = self .concurrency_limit_gradio , # type: ignore
792794 )
793795 elif self .modality == "audio-video" and self .mode == "send-receive" :
794- if ui_args .get ("full_screen" ) is False :
796+ if ui_args .get ("full_screen" , False ) is False :
795797 css = """.my-group {max-width: 600px !important; max-height: 600 !important;}
796798 .my-column {display: flex !important; justify-content: center !important; align-items: center !important};"""
797799 else :
@@ -818,7 +820,7 @@ def _generate_default_ui(
818820 icon_button_color = ui_args .get ("icon_button_color" ),
819821 pulse_color = ui_args .get ("pulse_color" ),
820822 icon_radius = ui_args .get ("icon_radius" ),
821- full_screen = ui_args .get ("full_screen" ),
823+ full_screen = ui_args .get ("full_screen" , False ),
822824 )
823825 self .webrtc_component = image
824826 input_components_to_render = [
@@ -827,15 +829,15 @@ def _generate_default_ui(
827829 if component not in same_components
828830 ]
829831 if input_components_to_render :
830- if ui_args .get ("full_screen" ) is False :
832+ if ui_args .get ("full_screen" , False ) is False :
831833 for component in input_components_to_render :
832834 component .render ()
833835 else :
834836 with gr .Sidebar (position = "left" ):
835837 for component in input_components_to_render :
836838 component .render ()
837839 if additional_output_components :
838- if ui_args .get ("full_screen" ) is False :
840+ if ui_args .get ("full_screen" , False ) is False :
839841 with gr .Column ():
840842 for component in additional_output_components :
841843 component .render ()
0 commit comments