ó
    ‚¤jU¿  ã                  ó®  • S r SSKJr  SSKrSSKrSSKrSSKrSSKJrJ	r	  SSK
JrJrJr  SSKJr  SSKJrJr  SSKJr  SS	KJrJrJrJrJrJrJrJr  SS
KJr  SSK J!r!J"r"J#r#  SSK$J%r%  SSK&J'r'J(r(J)r)  SSK*J+r+  SSK,J-r-J.r.J/r/J0r0J1r1  SSK2J3r3  \(       a  SSK4J5r5  SSK6J7r7  \" SSSSS5       " S S\5      5       r8\" 5        " S S\5      5       r9SSS jjr:g)zk
This file defines two useful high-level abstractions to build Gradio apps: Interface and TabbedInterface.
é    )ÚannotationsN)ÚCallableÚSequence)ÚTYPE_CHECKINGÚAnyÚLiteral)Údocument)ÚExamplesÚutils)ÚBlocks)ÚButtonÚClearButtonÚ	ComponentÚDeepLinkButtonÚDuplicateButtonÚMarkdownÚStateÚget_component_instance)ÚInterfaceTypes)Ú
DependencyÚEventsÚon)ÚRenderError)Ú	CSVLoggerÚFlaggingCallbackÚ
FlagMethod)ÚI18nData)Ú	AccordionÚColumnÚRowÚTabÚTabs)Úload_from_pipeline)ÚDiffusionPipeline)ÚPipelineÚlaunchÚloadÚfrom_pipelineÚ	integrateÚqueuec            $      óÂ  ^ • \ rS rSrSr\    S S j5       r S!SSSSSSSSSSSSSSSS	S
SSSSSSSSSSSSSSSSSS."                                                                           S"U 4S jjjjrS#S jrS$S jr	  S%S jr
    S&S jrS r      S'U 4S jjr    S(S jr      S)S jrS rS rS rSrU =r$ )*Ú	Interfaceé)   aÿ  
Interface is Gradio's main high-level class, and allows you to create a web-based GUI / demo
around a machine learning model (or any Python function) in a few lines of code.
You must specify three parameters: (1) the function to create a GUI for (2) the desired input components and
(3) the desired output components. Additional parameters can be used to control the appearance
and behavior of the demo.

Example:
    import gradio as gr

    def image_classifier(inp):
        return {'cat': 0.3, 'dog': 0.7}

    demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label")
    demo.launch()
Demos: hello_world, hello_world_2, hello_world_3
Guides: the-interface-class, interface-state, reactive-interfaces, four-kinds-of-interfaces, sharing-your-app
c                óD   • [        U5      n[        U40 UD6nU " S0 UD6nU$ )aâ  
Class method that constructs an Interface from a Hugging Face transformers.Pipeline or diffusers.DiffusionPipeline object.
The input and output components are automatically determined from the pipeline.
Parameters:
    pipeline: the pipeline object to use.
Returns:
    a Gradio Interface object from the given Pipeline
Example:
    import gradio as gr
    from transformers import pipeline
    pipe = pipeline("image-classification")
    gr.Interface.from_pipeline(pipe).launch()
© )r#   Údict)ÚclsÚpipelineÚkwargsÚinterface_infoÚ	interfaces        ÚžC:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\gradio/interface.pyr(   ÚInterface.from_pipeline>   s.   € ô" ,¨HÓ5ˆÜ�nÑ/¨Ñ/ˆÙ‘M˜&‘Mˆ	ØÐó    Né
   r   Fz.gradio/flaggedé   ÚpublicÚdefaultÚSubmitÚStopÚClearÚfullé   g      à?)"Úcache_examplesÚ
cache_modeÚexamples_per_pageÚexample_labelsÚpreload_exampleÚliveÚtitleÚdescriptionÚarticleÚflagging_modeÚflagging_optionsÚflagging_dirÚflagging_callbackÚanalytics_enabledÚbatchÚmax_batch_sizeÚapi_visibilityÚapi_nameÚapi_descriptionÚ	_api_modeÚallow_duplicationÚconcurrency_limitÚadditional_inputsÚadditional_inputs_accordionÚ
submit_btnÚstop_btnÚ	clear_btnÚdelete_cacheÚshow_progressÚ
fill_widthÚ
time_limitÚstream_everyÚ	deep_linkÚ	validatorc       "   	     óà  >• [         TBU ]  " S7USU=(       d    SU U"S.U'D6  [        U%[        5      (       a  [	        U%SSS9n%OU%SL a
  [	        SSS9n%[
        R                  " 5       (       a  U%c
  [	        SSS9n%U%SL a  Sn%U%U l        U#U l        U$U l	        UU l
        UU l        UU l        [        R                  U l        Ub  U/ :X  a  Ub  U/ :X  a  [!        S	5      eUb  U/ :X  a  / n[        R"                  U l        O Ub  U/ :X  a  / n[        R$                  U l        Uc  / U l        O8[        U[(        5      (       d  U/nU V(s/ s H  n([+        U(SS
9PM     sn(U l        [        U[(        [,        45      (       d  [/        SU 35      e[        U[(        [,        45      (       d  [/        SU 35      e[        U[        [,        45      (       a  U/n[        U[        [,        45      (       a  U/nXPl        X`l        X�l        U V(s/ s H  n([+        U(SS
9PM     sn(U l        U R6                  U R&                  -   U l        U V)s/ s H  n)[+        U)SS
9PM     sn)U l        [=        U R8                  5       V*V(s/ s H%  u  n*n(U(S:X  d  [        U([>        5      (       d  M#  U*PM'     n+n*n([=        U R:                  5       V*V)s/ s H%  u  n*n)U)S:X  d  [        U)[>        5      (       d  M#  U*PM'     n,n*n)[A        U+5      S:X  a  [A        U,5      S:X  a  Oº[A        U+5      S:w  d  [A        U,5      S:w  a  [!        S5      eU+S   n-U,S   n.U R8                  U-   S:X  a#  [
        RB                  " U5      U-   n/[?        U/S9n0OU R8                  U-   n0U0U R8                  U-'   U0U R:                  U.'   U(       a  [D        RF                  " S5        SU l        Uc  SSS.U l$        Op[        U[        5      (       a
  SU0U l$        OQ[        U[J        5      (       a%  URM                  URO                  5       5      U l$        O[!        S[Q        U5       35      eU R8                  U R:                  -    H&  n1[        U1[,        5      (       a  M  [!        U1 S35      e   [A        U R8                  5      [A        U R:                  5      :X  a[  [S        U R8                  U R:                  SS9 V(V)s/ s H
  u  n(n)U(U)L PM     n2n(n)[U        U25      (       a  [        RV                  U l        U R                  [        R                  [        R$                  4;   aU  U R:                   HE  n)[        U)[,        5      (       d  [/        S[Q        U)5       35      eU)RX                  b  M>  SU)l,        MG     UU l-        Xl.        U&U l/        SS/U l0        [c        USS5      U l2        X l3        X°l4        [
        Rj                  " U5      U l6        XÀl7        Ub  [
        Rp                  " U5      nXÐl9        X@l:        Xpl;        X€l<        [        U[z        5      (       a%  URM                  URO                  5       5      U l>        O7[        U[        5      (       a  USS.U l>        O[!        S[Q        U5       35      e[        U[z        5      (       a%  URM                  URO                  5       5      U l?        O8[        U[        5      (       a  USSS .U l?        O[!        S![Q        U5       35      eUc  SS"S#.U l@        Oq[        U[z        5      (       a%  URM                  URO                  5       5      U l@        O7[        U[        5      (       a  US"S.U l@        O[!        S$[Q        U5       35      eSU lA        Uc  [„        R†                  " S%S&5      U lD        OUS';   a  XàlD        O[!        S(5      eUc	  S)/U lE        O~[        U[Œ        5      (       d  [!        S*5      e[U        S+ U 5       5      (       a  U V3s/ s H
  n3S,U3 3U34PM     sn3U lE        O)[U        S- U 5       5      (       a  XðlE        O[!        S*5      eUc
  [�        5       nUU lH        UU lI        U!U lJ        UU lK        UU lL        UU lM        UU lN        SU lO        SU lP        SU lQ        SU lR        SU lS        [
        R¨                  " U R\                  5      n4/ n5 [ª        R¬                  " U R\                  5      S   n5[A        U55      S:”  a*  [ª        R®                  " U R\                  5      (       a  U5SS n5U5R±                  5        H2  n6[
        R²                  " U6U45      (       d  M!  U5Rµ                  U65        M4     [S        U R8                  U5SS9 HH  u  n1n6[        U1[,        5      (       d  [/        S.[Q        U15       35      eU1R¸                  b  MA  U6U1l\        MJ     [=        U R:                  5       Hm  u  n(n1[        U1[,        5      (       d  [/        S[Q        U15       35      eU1R¸                  b  MA  [A        U R:                  5      S:X  a	  S/U1l\        Mc  S0U( 3U1l\        Mo     U Rˆ                  S1:w  a«  U R                  [        RV                  :X  a1  U R�                  R»                  U R8                  U R’                  5        O\U R                  [        R"                  :X  a  O=U R�                  R»                  U R8                  U R:                  -   U R’                  5        U    U R                  (       a  U R                  R½                  5         U R¿                  5         S2u  n7n8n9n:n;Sn<[Á        5          U R                  [        R                  [        R"                  [        RV                  4;   a  U RÃ                  5       u  n7n8n9n:n<U R                  [        R                  [        R$                  4;   aC  U RÅ                  U75      u  n=n>n;n?n@U7=(       d    U=n7U8=(       d    U>n8U9=(       d    U?n9U:=(       d    W@n:SSS5        U8c  [Ç        S35      eU RÉ                  U7U95      nAU RË                  U8U<5        U;b  U;R½                  5         U RÍ                  U:U8WA5        UA(       a0  U R                  (       a  WARÏ                  S4 SU R                  /SS5S69  U RÑ                  5         U RÓ                  5         SSS5        U RÕ                  5       U lk        gs  sn(f s  sn(f s  sn)f s  sn(n*f s  sn)n*f s  sn)n(f s  sn3f ! [.        [         4 a    [
        R¶                  " 5       n5 GNÜf = f! , (       d  f       GN.= f! , (       d  f       Nˆ= f)8ar(  
Parameters:
    fn: the function to wrap an interface around. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
    inputs: a single Gradio component, or list of Gradio components. Components can either be passed as instantiated objects, or referred to by their string shortcuts. The number of input components should match the number of parameters in fn. If set to None, then only the output components will be displayed.
    outputs: a single Gradio component, or list of Gradio components. Components can either be passed as instantiated objects, or referred to by their string shortcuts. The number of output components should match the number of values returned by fn. If set to None, then only the input components will be displayed.
    examples: sample inputs for the function; if provided, appear below the UI components and can be clicked to populate the interface. Should be nested list, in which the outer list consists of samples and each inner list consists of an input corresponding to each input component. A string path to a directory of examples can also be provided, but it should be within the directory with the python file running the gradio app. If there are multiple input components and a directory is provided, a log.csv file must be present in the directory to link corresponding inputs.
    cache_examples: If True, caches examples in the server for fast runtime in examples. If "lazy", then examples are cached (for all users of the app) after their first use (by any user of the app). If None, will use the GRADIO_CACHE_EXAMPLES environment variable, which should be either "true" or "false". In HuggingFace Spaces, this parameter defaults to True (as long as `fn` and `outputs` are also provided).  Note that examples are cached separately from Gradio's queue() so certain features, such as gr.Progress(), gr.Info(), gr.Warning(), etc. will not be displayed in Gradio's UI for cached examples.
    cache_mode: if "lazy", examples are cached after their first use. If "eager", all examples are cached at app launch. If None, will use the GRADIO_CACHE_MODE environment variable if defined, or default to "eager". In HuggingFace Spaces, this parameter defaults to "eager" except for ZeroGPU Spaces, in which case it defaults to "lazy".
    examples_per_page: if examples are provided, how many to display per page.
    preload_example: If an integer is provided (and examples are being cached eagerly and none of the input components have a developer-provided `value`), the example at that index in the examples list will be preloaded when the Gradio app is first loaded. If False, no example will be preloaded.
    live: whether the interface should automatically rerun if any of the inputs change.
    title: a title for the interface; if provided, appears above the input and output components in large font. Also used as the tab title when opened in a browser window.
    description: a description for the interface; if provided, appears above the input and output components and beneath the title in regular font. Accepts Markdown and HTML content.
    article: an expanded article explaining the interface; if provided, appears below the input and output components in regular font. Accepts Markdown and HTML content. If it is an HTTP(S) link to a downloadable remote file, the content of this file is displayed.
    flagging_mode: one of "never", "auto", or "manual". If "never" or "auto", users will not see a button to flag an input and output. If "manual", users will see a button to flag. If "auto", every input the user submits will be automatically flagged, along with the generated output. If "manual", both the input and outputs are flagged when the user clicks flag button. This parameter can be set with environmental variable GRADIO_FLAGGING_MODE; otherwise defaults to "manual".
    flagging_options: if provided, allows user to select from the list of options when flagging. Only applies if flagging_mode is "manual". Can either be a list of tuples of the form (label, value), where label is the string that will be displayed on the button and value is the string that will be stored in the flagging CSV; or it can be a list of strings ["X", "Y"], in which case the values will be the list of strings and the labels will ["Flag as X", "Flag as Y"], etc.
    flagging_dir: path to the directory where flagged data is stored. If the directory does not exist, it will be created.
    flagging_callback: either None or an instance of a subclass of FlaggingCallback which will be called when a sample is flagged. If set to None, an instance of gradio.flagging.CSVLogger will be created and logs will be saved to a local CSV file in flagging_dir. Default to None.
    analytics_enabled: whether to allow basic telemetry. If None, will use GRADIO_ANALYTICS_ENABLED environment variable if defined, or default to True.
    batch: if True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
    max_batch_size: the maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
    api_name: defines how the prediction endpoint appears in the API docs. Can be a string or None. If set to a string, the endpoint will be exposed in the API docs with the given name. If None, the name of the function will be used.
    api_description: Description of the API endpoint. Can be a string, None, or False. If set to a string, the endpoint will be exposed in the API docs with the given description. If None, the function's docstring will be used as the API endpoint description. If False, then no description will be displayed in the API docs.
    api_visibility: Controls the visibility of the prediction endpoint. Can be "public" (shown in API docs and callable), "private" (hidden from API docs and not callable by the Gradio client libraries), or "undocumented" (hidden from API docs but callable).
    allow_duplication: if True, then will show a 'Duplicate Spaces' button on Hugging Face Spaces.
    concurrency_limit: if set, this is the maximum number of this event that can be running simultaneously. Can be set to None to mean no concurrency_limit (any number of this event can be running simultaneously). Set to "default" to use the default concurrency limit (defined by the `default_concurrency_limit` parameter in `.queue()`, which itself is 1 by default).
    additional_inputs: a single Gradio component, or list of Gradio components. Components can either be passed as instantiated objects, or referred to by their string shortcuts. These components will be rendered in an accordion below the main input components. By default, no additional input components will be displayed.
    additional_inputs_accordion: if a string is provided, this is the label of the `gr.Accordion` to use to contain additional inputs. A `gr.Accordion` object can be provided as well to configure other properties of the container holding the additional inputs. Defaults to a `gr.Accordion(label="Additional Inputs", open=False)`. This parameter is only used if `additional_inputs` is provided.
    submit_btn: the button to use for submitting inputs. Defaults to a `gr.Button("Submit", variant="primary")`. This parameter does not apply if the Interface is output-only, in which case the submit button always displays "Generate". Can be set to a string (which becomes the button label) or a `gr.Button` object (which allows for more customization).
    stop_btn: the button to use for stopping the interface. Defaults to a `gr.Button("Stop", variant="stop", visible=False)`. Can be set to a string (which becomes the button label) or a `gr.Button` object (which allows for more customization).
    clear_btn: the button to use for clearing the inputs. Defaults to a `gr.Button("Clear", variant="secondary")`. Can be set to a string (which becomes the button label) or a `gr.Button` object (which allows for more customization). Can be set to None, which hides the button.
    delete_cache: a tuple corresponding [frequency, age] both expressed in number of seconds. Every `frequency` seconds, the temporary files created by this Blocks instance will be deleted if more than `age` seconds have passed since the file was created. For example, setting this to (86400, 86400) will delete temporary files every day. The cache will be deleted entirely when the server restarts. If None, no cache deletion will occur.
    show_progress: how to show the progress animation while event is running: "full" shows a spinner which covers the output component area as well as a runtime display in the upper right corner, "minimal" only shows the runtime display, "hidden" shows no progress animation at all
    example_labels: a list of labels for each example. If provided, the length of this list should be the same as the number of examples, and these labels will be used in the UI instead of rendering the example values.
    fill_width: whether to horizontally expand to fill container fully. If False, centers and constrains app to a maximum width.
    time_limit: The time limit for the stream to run. Default is 30 seconds. Parameter only used for streaming images or audio if the interface is live and the input components are set to "streaming=True".
    stream_every: The latency (in seconds) at which stream chunks are sent to the backend. Defaults to 0.5 seconds. Parameter only used for streaming images or audio if the interface is live and the input components are set to "streaming=True".
    deep_link: a string or `gr.DeepLinkButton` object that creates a unique URL you can use to share your app and all components **as they currently are** with others. Automatically enabled on Hugging Face Spaces unless explicitly set to False.
    validator: a function that takes in the inputs and can optionally return a gr.validate() object for each input.

r5   ÚGradio)rO   ÚmoderH   r]   r_   F)ÚvalueÚrenderÚinteractiveT)rh   ri   Nz2Must provide at least one of `inputs` or `outputs`)Úunrenderz1inputs must be a string, list, or Component, not z2outputs must be a string, list, or Component, not Ústater   é   zMIf using 'state', there must be exactly one state input and one state output.)rg   z]Cache examples cannot be used with state inputs and outputs. Setting cache_examples to False.zAdditional Inputs)ÚlabelÚopenrm   zRThe `additional_inputs_accordion` parameter must be a string or gr.Accordion, not z5 is not a valid input/output component for Interface.©Ústrictz*Output component must be a Component, not Ú__name__ÚfnÚprimary)rg   Úvariantz<The submit_btn parameter must be a gr.Button or string, not Ústop)rg   rt   Úvisiblez:The stop_btn parameter must be a gr.Button or string, not Ú	secondary)rv   rt   zDThe clear_btn parameter must be a gr.Button, a string, or None, not ÚGRADIO_FLAGGING_MODEÚmanual)ry   ÚneverÚautozRInvalid value for `flagging_mode` parameter.Must be: 'auto', 'manual', or 'never'.)ÚFlagNzNflagging_options must be a list of strings or list of (string, string) tuples.c              3  óB   #   • U  H  n[        U[        5      v •  M     g 7f©N)Ú
isinstanceÚstr©Ú.0Úxs     r6   Ú	<genexpr>Ú%Interface.__init__.<locals>.<genexpr>—  s   é € Ð>Ò-=¨”˜Aœs×#Ð#Ò-=ùó   ‚zFlag as c              3  óB   #   • U  H  n[        U[        5      v •  M     g 7fr~   )r   Útupler�   s     r6   r„   r…   ™  s   é € Ð@Ò/?¨!”˜Aœu×%Ð%Ò/?ùr†   z)Input component must be a Component, not Úoutputzoutput rz   )NNNNNzClear button not renderedc                 ó   • [        SS9$ ©NT)ri   ©r   r/   r8   r6   Ú<lambda>Ú$Interface.__init__.<locals>.<lambda>  ó	   € œN°tÒ<r8   Úundocumented©ÚinputsÚoutputsÚjsrR   r/   )lÚsuperÚ__init__r   r€   r   r   Ú	get_spacerb   r`   ra   rS   rT   rR   r   ÚSTANDARDÚinterface_typeÚ
ValueErrorÚ
INPUT_ONLYÚOUTPUT_ONLYÚadditional_input_componentsr   r   r   Ú	TypeErrorrB   rC   rF   Úmain_input_componentsÚinput_componentsÚoutput_componentsÚ	enumerater   ÚlenÚget_default_argsÚwarningsÚwarnÚ"additional_inputs_accordion_paramsr   Úrecover_kwargsÚ
get_configÚtypeÚzipÚallÚUNIFIEDri   Úapi_moderr   rc   Úfn_durationsÚgetattrrq   rG   rH   Úremove_html_tagsÚsimple_descriptionrI   Údownload_if_urlrJ   ÚexamplesrD   rE   r   Úsubmit_btn_parmsÚstop_btn_parmsÚclear_btn_paramsÚsimple_serverÚosÚgetenvrK   rL   Úlistr   rN   rM   r^   rP   rQ   rV   rW   ÚshareÚ	share_urlÚ	local_urlÚfavicon_pathÚi18n_instanceÚget_type_hintsÚinspectÚgetfullargspecÚismethodÚcopyÚis_special_typed_parameterÚremoveÚdefault_input_labelsrm   ÚsetupÚactivateÚrender_title_descriptionr    Úrender_input_columnÚrender_output_columnr   Úattach_submit_eventsÚattach_clear_eventsÚattach_flagging_eventsÚthenÚrender_examplesÚrender_articleÚget_config_fileÚconfig)CÚselfrr   r’   r“   r´   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   r3   ÚiÚoÚidxÚstate_input_indexesÚstate_output_indexesÚstate_input_indexÚstate_output_indexr<   Ústate_variableÚ	componentÚsame_componentsrƒ   Úparam_typesÚparam_namesÚ
param_nameÚ_submit_btnÚ
_clear_btnÚ	_stop_btnÚ	flag_btnsÚduplicate_btnÚinput_component_columnÚ_submit_btn_outÚ_clear_btn_2_outÚ_stop_btn_2_outÚflag_btns_outÚ_submit_eventÚ	__class__sC                                                                     €r6   r–   ÚInterface.__init__T   sú  ø€ ôn 	‰Òð 	
Ø/ØØ×#˜8Ø%Ø!ñ	
ð ò	
ô �i¤×%Ñ%Ü&¨Y¸uÐRWÑX‰IØ˜$ÒÜ&¨eÀÑGˆIÜ�?Š?×Ñ Ñ!2Ü&¨eÀÑGˆIØ˜ÒØˆIØ"ˆŒØ$ˆŒØ(ˆÔØ$,ˆŒØ<KˆÔØ,ˆÔÜ,×5Ñ5ˆÔØ‰N˜f¨›l°±ÀGÈrÃMÜÐQÓRÐRØ‰_ ¨2£ØˆGÜ"0×";Ñ";ˆDÕØ‰^˜v¨›|ØˆFÜ"0×"<Ñ"<ˆDÔØÑ$Ø/1ˆDÕ,äÐ/´×:Ñ:Ø%6Ð$7Ð!ñ +ó0â*�Aô ' q°4Ô8Ù*ñ0ˆDÔ,ô
 ˜&¤8¬YÐ"7×8Ñ8ÜØCÀFÀ8ÐLóð ô ˜'¤H¬iÐ#8×9Ñ9ÜØDÀWÀIÐNóð ô �fœs¤IÐ.×/Ñ/Ø�XˆFÜ�g¤¤YÐ/×0Ñ0Ø�iˆGà,ÔØ;EŒØ.Ôñ ?Eó&
Ú>D¸Ô" 1¨tÔ4¹fñ&
ˆÔ"ð ×&Ñ&¨×)IÑ)IÑIð 	Ôñ
 ó"
â�ô # 1¨tÔ4Ùñ"
ˆÔô $ D×$9Ñ$9Ô:ô
â:‘��QØ�G‹|œz¨!¬U×3÷ Ù:ð 	ñ 
ô $ D×$:Ñ$:Ô;ô 
â;‘��QØ�G‹|œz¨!¬U×3÷ Ù;ð 	ñ  
ô Ð"Ó# qÓ(¬SÐ1EÓ-FÈ!Ó-KØÜÐ$Ó%¨Ó*¬cÐ2FÓ.GÈ1Ó.LÜØ_óð ð !4°AÑ 6ÐØ!5°aÑ!8ÐØ×$Ñ$Ð%6Ñ7¸7ÓBÜ×0Ò0°Ó4Ð5FÑG�Ü!&¨WÑ!5‘à!%×!6Ñ!6Ð7HÑ!I�à7EˆD×!Ñ!Ð"3Ñ4Ø9GˆD×"Ñ"Ð#5Ñ6æÜ—’ð7ôð #(ˆDÔà&Ñ.à,Øñ7ˆDÕ3ô Ð3´S×9Ñ9àÐ4ð7ˆDÕ3ô Ð3´Y×?Ñ?à+×:Ñ:Ø/×:Ñ:Ó<óð Õ3ô ØdÔeið  kFó  fGð  eHð  Ióð ð ×.Ñ.°×1GÑ1GÔGˆIÜ˜y¬)×4Ó4Ü Ø �kÐ!VÐWóð ñ Hô ˆt×$Ñ$Ó%¬¨T×-CÑ-CÓ)DÓDô  Ø×)Ñ)¨4×+AÑ+AÈ%òôò‘D�A�qð �Q“ñð ñ ô �?×#Ñ#Ü&4×&<Ñ&<�Ô#à×ÑÜ×#Ñ#Ü×&Ñ&ð#
ó 
ð ×+Ô+�Ü! !¤Y×/Ñ/Ü#ØDÄTÈ!ÃWÀIÐNóð ð —=‘=Ó(ð %*�A–Mñ ,ð "ˆŒØŒØ"ˆŒØ ˜FˆÔÜ  J°Ó5ˆŒØŒ	ØŒ
ä"'×"8Ò"8¸Ó"EˆÔØ&ÔØÑÜ×+Ò+¨GÓ4ˆGØŒà ŒØ!2ÔØ,Ôä�j¤&×)Ñ)Ø$.×$=Ñ$=¸j×>SÑ>SÓ>UÓ$VˆDÕ!Ü˜
¤C×(Ñ(à#Ø$ñ%ˆDÕ!ô
 ØNÌtÐT^ÓO_ÐN`Ðaóð ô �h¤×'Ñ'Ø"*×"9Ñ"9¸(×:MÑ:MÓ:OÓ"PˆDÕÜ˜¤#×&Ñ&à!Ø!Ø ñ#ˆDÕô ØLÌTÐRZË^ÐL\Ð]óð ð Ñà Ø&ñ%ˆDÕ!ô ˜	¤6×*Ñ*Ø$-×$<Ñ$<¸Y×=QÑ=QÓ=SÓ$TˆDÕ!Ü˜	¤3×'Ñ'à"Ø&ñ%ˆDÕ!ô
 ØVÔW[Ð\eÓWfÐVgÐhóð ð "ˆÔð Ñ Ü!#§¢Ð+AÀ8Ó!LˆDÕØÐ9Ó9Ø!.Õäð9óð ð
 Ñ#Ø%3Ð$4ˆDÕ!ÜÐ-¬t×4Ñ4ÜØ`óð ô Ñ>Ñ-=Ó>×>Ñ>ÙBRÓ$SÒBR¸Q¨°° n°aÓ%8ÑBRÑ$SˆDÕ!ÜÑ@Ñ/?Ó@×@Ñ@Ø$4Õ!äØ`óð ð Ñ$Ü )£Ðà!2ˆÔØ(ˆÔØCPˆÔàˆŒ
Ø,ˆÔØ!2ˆÔØBSˆÔàˆŒ
ØˆŒØˆŒà ˆÔØ!ˆÔä×*Ò*¨4¯7©7Ó3ˆàˆð	7Ü!×0Ò0°·±Ó9¸!Ñ<ˆKÜ�;Ó !Ó#¬×(8Ò(8¸¿¹×(AÑ(AØ)¨!¨"˜o�Ø)×.Ñ.Ö0�
Ü×3Ò3°JÀ×LÓLØ×&Ñ& zÖ2ñ 1ô
 &)Ø×!Ñ! ;°uô&
Ñ!ˆI�zô ˜i¬×3Ñ3ÜØ?ÄÀYÃÐ?PÐQóð ð �‰Ó&Ø",�	–ñ&
ô & d×&<Ñ&<Ö=‰LˆAˆyÜ˜i¬×3Ñ3ÜØ@ÄÀiÃÐ@QÐRóð ð �‰Ó&Ü�t×-Ñ-Ó.°!Ó3Ø&.�I–Oà(/°¨s m�I–Oñ >ð ×Ñ Ó(Ø×"Ñ"¤n×&<Ñ&<Ó<Ø×&Ñ&×,Ñ,¨T×-BÑ-BÀD×DUÑDUÕVØ×$Ñ$¬×(AÑ(AÓAØà×&Ñ&×,Ñ,Ø×)Ñ)¨D×,BÑ,BÑBØ×%Ñ%ôò Ø�~�~Ø—‘×'Ñ'Ô)Ø×)Ñ)Ô+ðLÑHˆK˜ Y°	¸=ð &*Ð"ä•Ø×&Ñ&Ü"×+Ñ+Ü"×-Ñ-Ü"×*Ñ*ð+ó ð ×0Ñ0Ó2ñØ#Ø"Ø!Ø!Ø.à×&Ñ&Ü"×+Ñ+Ü"×.Ñ.ð+ó ð ×1Ñ1°+Ó>ñØ'Ø(Ø%Ø'Ø%à"-×"@°�KØ!+×!?Ð/?�JØ )× <¨_�IØ )× :¨]�I÷7 ð: Ñ!Ü!Ð"=Ó>Ð>à ×5Ñ5°kÀ9ÓMˆMØ×$Ñ$ ZÐ1GÔHØÑ(Ø×&Ñ&Ô(à×'Ñ'¨	°:¸}ÔMÞ §§Ø×"Ñ"Ù<ØØ!Ÿ^™^Ð,ØØ#1ð #ñ ð × Ñ Ô"Ø×ÑÔ!÷{ ð~ ×*Ñ*Ó,ˆ�ùò_
0ùò.&
ùò"
ùó

ùó
 
ùótùòP %TøôJ œ:Ð&ó 	7Ü×4Ò4Ó6‹Kð	7ú÷` –ú÷ �Túsv   Ås;Èt ÉtÉ5"t
Êt
Ê<"tË"tÓtàtãB	t! åt! ìAuí!Cuð&B7uô!%u
õ	u
õ
u	õuõ
u-c                ó¦   • U R                   (       a  [        SU R                    S35        U R                  (       a  [        U R                  5        g g )Nú4<h1 style='text-align: center; margin-bottom: 1rem'>ú</h1>)rH   r   rI   ©rÖ   s    r6   rË   Ú"Interface.render_title_description   s@   € Ø�:�:ÜØFÀtÇzÁzÀlÐRWÐXôð ××Ü�T×%Ñ%Õ&ð r8   c                ób   • U R                    VVs/ s H  u  p[        U5      PM     snn$ s  snnf r~   )rL   r   )rÖ   rm   Ú_s      r6   Úrender_flag_btnsÚInterface.render_flag_btns(  s(   € Ø.2×.CÒ.CÔDÒ.C¡( %”�u–Ñ.CÒDÐDùÓDs   �+c                óZ  • Su  pp4[        5          [        5       nU   U R                   H  nUR                  5         M     U R                  (       aA  [	        S0 U R
                  D6   U R                   H  nUR                  5         M     S S S 5        S S S 5        [        5          U R                  [        R                  [        R                  4;   aå  [        S0 U R                  D6nU R                  (       d½  U R                  (       a8  U R                  [        R                  :X  a  U R                  R                  5         [        S0 U R                   D6n["        R$                  " U R&                  5      (       d%  ["        R(                  " U R&                  5      (       a  [        S0 U R*                  D6nGOU R                  [        R,                  :X  aù  [        S0 U R                  D6n[        S0 U R                   D6nU R                  (       a  U R                  R                  5         ["        R$                  " U R&                  5      (       d%  ["        R(                  " U R&                  5      (       a&  U R                  (       d  [        S0 U R*                  D6nU R.                  S:X  a  U R1                  5       nOU R.                  S:X  a  U/nS S S 5        S S S 5        UUUUW4$ ! , (       d  f       GNc= f! , (       d  f       GNm= f! , (       d  f       NA= f! , (       d  f       NJ= f)N©NNNNry   r{   r/   )r   rŸ   rh   r�   r   r§   r    r™   r   r˜   r›   r   r·   rG   rb   r   rµ   rÂ   Úisgeneratorfunctionrr   Úisasyncgenfunctionr¶   r­   rK   rø   )rÖ   rä   rå   ræ   rç   ré   rß   s          r6   rÌ   ÚInterface.render_input_column+  sY  € ð 9OÑ5ˆ ä�XÜ%+£XÐ"Ú'Ø!%×!;Ô!;�IØ×$Ñ$Ö&ñ "<à×3×3Ü"ÑM T×%LÑ%LÓMØ)-×)IÔ)I˜IØ%×,Ñ,Ö.ñ *J÷ N÷	 (ô •Ø×&Ñ&Ü"×+Ñ+Ü"×-Ñ-ð+ó ô "-Ñ!E¨t×/DÑ/DÑ!E�JØŸ9Ÿ9à ŸNŸNØ $× 3Ñ 3´~×7PÑ7PÓ Pà ŸN™N×1Ñ1Ô3Ü&,Ñ&E¨t×/DÑ/DÑ&E˜ô #×6Ò6Ø ŸG™G÷ñ ä$×7Ò7¸¿¹×@Ñ@Ü(.Ñ(E°×1DÑ1DÑ(E˜IùØ×(Ñ(¬N×,BÑ,BÓBÜ!,Ñ!E¨t×/DÑ/DÑ!E�JÜ"(Ñ"A¨4×+@Ñ+@Ñ"A�KØ—~—~ØŸ™×-Ñ-Ô/ä×3Ò3°D·G±G×<Ñ<Ü"×5Ò5°d·g±g×>Ñ>Ø"ŸiŸiÜ$*Ñ$A¨T×-@Ñ-@Ñ$A˜	Ø×)Ñ)¨XÓ5Ø$(×$9Ñ$9Ó$;™	Ø×+Ñ+¨vÓ5Ø%0 M˜	÷G ÷ ð\ ØØØØ"ð
ð 	
÷O NÖMú÷	 (Ö'ú÷ •ú÷ �XúsT   �L�A
K9Á'$K'ÂK9ÂLÂ%H+LËLË'
K6Ë1K9Ë9
L	ÌLÌ
L	ÌLÌ
L*c                óŽ  • UnSu  p4pV[        5          U R                   H*  n[        U[        5      (       a  M  UR	                  5         M,     [        5          U R                  (       a  U R                  R	                  5         U R                  [        R                  :X  a�  [        S0 U R                  D6n[        SSS9n[        R                  " U R                  5      (       d%  [        R                   " U R                  5      (       a&  U R"                  (       d  [        S0 U R$                  D6nU R&                  S:X  a  U R)                  5       nO!U R&                  S:X  a  Uc  [+        S5      eU/nU R,                  (       a  [/        SS	S
S9nS S S 5        S S S 5        UUUUU4$ ! , (       d  f       N= f! , (       d  f       N&= f)Nrû   ÚGeneraters   )rt   ry   r{   úSubmit button not renderedrl   ÚlgF)ÚscaleÚsizeÚ	_activater/   )r   r¡   r   r   rh   r    rb   r™   r   rœ   r   r·   r   rÂ   rü   rr   rý   rG   r¶   rK   rø   r   rV   r   )rÖ   Ú_submit_btn_inrä   rå   rè   rç   ræ   rß   s           r6   rÍ   ÚInterface.render_output_columnk  sl  € ð %ˆð;
Ñ7ˆ
 9ô �XØ!×3Ô3�	Ü" 9¬e×4Ó4Ø×$Ñ$Ö&ñ 4ô •Ø—>—>Ø—N‘N×)Ñ)Ô+Ø×&Ñ&¬.×*DÑ*DÓDÜ!,Ñ!E¨t×/DÑ/DÑ!E�JÜ"(¨¸YÑ"G�Kä×3Ò3°D·G±G×<Ñ<Ü"×5Ò5°d·g±g×>Ñ>Ø"ŸiŸiô %+Ñ$A¨T×-@Ñ-@Ñ$A˜	Ø×%Ñ%¨Ó1Ø $× 5Ñ 5Ó 7‘IØ×'Ñ'¨6Ó1Ø"Ñ*Ü)Ð*FÓGÐGØ!, �Ià×)×)Ü$3¸!À$ÐRWÑ$X�M÷1 ÷	 ð> ØØØØð
ð 	
÷5 •ú÷	 �Xús)   ’#F6¹F6ÁD7F%ÆF6Æ%
F3	Æ/F6Æ6
Gc                óR   • U R                   (       a  [        U R                   5        g g r~   )rJ   r   rô   s    r6   rÓ   ÚInterface.render_article£  s   € Ø�<�<Ü�T—\‘\Õ"ð r8   c                óò  >• U R                   (       Ga  U R                  [        R                  :X  aº  Uc  [	        S5      e[
        TU ]  U R                  S U R                  5        UR                  U R                  S U R                  U R                  U R                  U R                  U R                  (       + U R                  (       + U R                  U R                  U R                   S9$ / nSnU R"                   H|  nUR%                  S5      (       a0  UR&                  (       a  UR)                  UR*                  5        SnMI  UR%                  S5      (       d  Ma  UR)                  UR,                  5        M~     [/        UU R                  U R"                  U R                  U R                  U R                  U R                  U R                  (       + U R                  (       + U(       a  SOU R0                  U(       d  SOS	U R2                  U R4                  U R                   S
9$ Uc  [	        S5      eU R                  n/ nUR                  /U R"                   Vs/ s H5  nUR%                  [6        R8                  5      (       d  M)  UR8                  PM7     sn-   nU R"                   H-  n[;        USS 5      (       d  M  [<        R>                  " S5        M/     U(       aú  X/nS n	[/        U[@        RB                  " S 5      S X/SSS9RE                  U R                  U R"                  U R                  U R                  U R                  U R                  SU R                  (       + U R                  (       + U R                  U R                  U RF                  U R0                  U R                   S9n
U
RE                  U	S USSS9nUR                  U	S X/U
SSS9  U$ [/        UUU R"                  U R                  U R                  U R                  U R                  SU R                  (       + U R                  (       + U R                  U R                  U RF                  U R0                  U R                   S9$ s  snf )Nr  )rS   rR   rT   Ú
preprocessÚpostprocessrP   rQ   rc   FÚstreamTÚchangeÚhiddenÚalways_lastÚmultiple)
rS   rT   rR   r  r  r^   Útrigger_moder`   ra   rc   Ú	streamingz;Streaming components are only supported in live interfaces.c               “  ó.   #   • [        SS9[        SS9/$ 7f)NT©rv   F©r   r/   r8   r6   ÚcleanupÚ/Interface.attach_submit_events.<locals>.cleanupì  s   é € Ü"¨4Ñ0´&ÀÑ2GÐHÐHùs   ‚c                 ó&   • [        SS9[        SS94$ )NFr  Tr  r/   r8   r6   r�   Ú0Interface.attach_submit_events.<locals>.<lambda>ò  s   € Ü"¨5Ñ1Ü"¨4Ñ0ñ!r8   r�   )r’   r“   r*   rR   )rS   rR   rT   Úscroll_to_outputr  r  rP   rQ   rW   r^   rc   )r’   r“   Úcancelsr*   rR   )$rG   r™   r   rœ   r   r•   r'   rr   r¡   ÚclickrS   rR   rT   r®   rP   rQ   rc   r    Ú	has_eventr  Úappendr  r  r   r^   r`   ra   r   Úsubmitr°   r¥   r¦   r   Úasync_lambdarÑ   rW   )rÖ   rä   ræ   ÚeventsÚstreaming_eventrß   rr   Úextra_outputÚtriggersr  Úpredict_eventÚfinal_eventrï   s               €r6   rÎ   ÚInterface.attach_submit_events§  s÷  ø€ ð �9�9ˆ9Ø×"Ñ"¤n×&@Ñ&@Ó@ØÑ&Ü%Ð&BÓCÐCÜ‘‘˜TŸW™W d¨D×,BÑ,BÔCð #×(Ñ(Ø—G‘GØØ×*Ñ*Ø!Ÿ]™]Ø#'×#6Ñ#6Ø$(×$8Ñ$8Ø$(§M¡MÔ2Ø%)§]¡]Ô 3ØŸ*™*Ø#'×#6Ñ#6Ø"Ÿn™nð )ð ð ð *,�Ø"'�Ø!%×!6Ô!6�IØ ×*Ñ*¨8×4Ñ4¸×9L×9LØŸ™ i×&6Ñ&6Ô7Ø*.šØ"×,Ñ,¨X×6Ó6ØŸ™ i×&6Ñ&6Ö7ñ "7ô ØØ—G‘GØ×)Ñ)Ø×*Ñ*Ø!Ÿ]™]Ø$(×$8Ñ$8Ø#'×#6Ñ#6Ø$(§M¡MÔ2Ø%)§]¡]Ô 3Þ.=¡(À4×CUÑCUÞ6E¡È:Ø#Ÿ™Ø!%×!2Ñ!2Ø"Ÿn™nñð ð" Ñ"Ü!Ð">Ó?Ð?Ø—‘ˆBØˆLà#×)Ñ)Ð*à!%×!6Ò!6ó.â!6�IØ×&Ñ&¤v§}¡}×5ó !�	× Ô Ù!6ñ.ñ ˆHð "×2Ô2�	Ü˜9 k°4×8Ó8Ü—M’MØUöñ 3ö Ø +Ð7�òIô !#ØÜ×&Ò&ñóð  Ø(Ð4ØØ#1ñ!÷ ‘$Ø—G‘GØ×)Ñ)Ø×*Ñ*Ø!Ÿ]™]Ø#'×#6Ñ#6Ø$(×$8Ñ$8Ø%)Ø$(§M¡MÔ2Ø%)§]¡]Ô 3ØŸ*™*Ø#'×#6Ñ#6Ø&*×&<Ñ&<Ø"&×"4Ñ"4Ø"Ÿn™nð ð ð ð: ,×0Ñ0ØØØ(ØØ#1ð 1ð �ð —‘ØØØ(Ð4Ø)ØØ#1ð  ñ ð #Ð"äØØØ×)Ñ)Ø×*Ñ*Ø!Ÿ]™]Ø#'×#6Ñ#6Ø$(×$8Ñ$8Ø%)Ø$(§M¡MÔ2Ø%)§]¡]Ô 3ØŸ*™*Ø#'×#6Ñ#6Ø&*×&<Ñ&<Ø"&×"4Ñ"4Ø"Ÿn™nñð ùòC.s   É(Q4ÊQ4c                óD  • UR                  U R                  U R                  -   5        UR                  S / U(       a  U/O/ S[        R
                  " U R                  [        R                  [        R                  [        R                  4;   a  S SSS./O/ 5       S3S9  g )Nz() => TÚupdate)rt   rv   Ú__type__z
            )r”   )Úaddr    r¡   r  ÚjsonÚdumpsr™   r   r˜   r›   r­   )rÖ   rå   ré   s      r6   rÏ   ÚInterface.attach_clear_events0  s¥   € ð
 	�‰�t×,Ñ,¨t×/EÑ/EÑEÔFØ×ÑØØÞ)?Ð$Ñ%ÀRØÜ—
’
à×*Ñ*ä&×/Ñ/Ü&×1Ñ1Ü&×.Ñ.ðóð "&°$ÀHÑMÑNð ó	ðððð	 	ò 	
r8   c           
     óN  • U(       a=  U R                   [        R                  [        R                  [        R                  4;   d  g U R
                  S:X  aB  [        U R                  SS SS9nUR                  UU R                  U R                  -   S SSSS9  g U R                   [        R                  :X  a  U R                  nOU R                  U R                  -   n[        XR                  SS9 H²  u  nu  pxUb$  [        U[        5      (       d  [        SU< 35      e[        U R                  Xx5      nUR!                  ["        R$                  " S	 5      S USSS
9  UR!                  UUUSSSS9  UR!                  ["        R$                  " UR&                  5      S USSS
9  M´     g )Nr{   Ú F)Úvisual_feedbackr�   )r’   r“   r  r*   rR   ro   z,Flagging option value must be a string, not c                 ó   • [        SSS9$ )Nz	Saving...F)rg   ri   r  r/   r8   r6   r�   Ú2Interface.attach_flagging_events.<locals>.<lambda>w  s   € œF¨À%ÒHr8   )r*   rR   )r™   r   r˜   rœ   r­   rK   r   rN   Úsuccessr    r¡   r«   rL   r   r€   rž   r  r   r!  Úreset)	rÖ   rç   rå   rî   Úflag_methodÚflag_componentsÚflag_btnrm   rg   s	            r6   rÐ   Ú Interface.attach_flagging_eventsI  s½  € ö Ø×#Ñ#ä×'Ñ'Ü×*Ñ*Ü×&Ñ&ðóð à×Ñ Ó'Ü$Ø×&Ñ&¨¨DÀ%ñˆKð ×!Ñ!ØØ×,Ñ,¨t×/EÑ/EÑEØØ ØØ-ð "ñ ð à×Ñ¤.×"8Ñ"8Ó8Ø"×3Ñ3‰Oà"×3Ñ3°d×6LÑ6LÑLˆOä(+Ø×,Ñ,°Uô)
Ñ$ˆH‘n�uð Ñ ¬°E¼3×)?Ñ)?ÜØBÀ5Á)ÐLóð ô % T×%;Ñ%;¸UÓJˆKØ�N‰NÜ×"Ò"ÙHóð ØØØ-ð ñ ð �N‰NØØ&Ø Ø ØØ-ð ñ ð ×ÑÜ×"Ò" ;×#4Ñ#4Ó5ØØØØ-ð ó ò3)
r8   c                óÂ  • U R                   (       GaC  U R                   Vs/ s H  n[        U[        5      (       a  M  UPM     nnU R                   Vs/ s H  n[        U[        5      (       a  M  UPM     nn[        U R                   UUU R                  U R                  U R                  U R                  U R                  =(       d    SU R                  U R                  U R                  S9U l        U R                  (       aP  U R                  R                   (       a4  U R                  R                   R#                  S S U R                  /SSS9  g g g g s  snf s  snf )NF)r´   r’   r“   rr   rB   rC   rD   rU   rP   rE   Úpreloadc                 ó   • [        SS9$ r‹   rŒ   r/   r8   r6   r�   Ú+Interface.render_examples.<locals>.<lambda>©  r�   r8   Tr�   r‘   )r´   r    r   r   r¡   r
   rr   rB   rC   rD   r®   rP   rE   rF   Úexamples_handlerrb   Úcache_eventrÑ   )rÖ   ÚcÚnon_state_inputsÚnon_state_outputss       r6   rÒ   ÚInterface.render_examplesŽ  s3  € Ø�=�=ˆ=ð ×.Ò.ó â.�AÜ! !¤U×+÷ Ù.ð ð  ð ×/Ò/ó!â/�AÜ! !¤U×+÷ Ù/ð ð !ô
 %-ØŸ™Ø'Ø)Ø—7‘7Ø#×2Ñ2ØŸ?™?Ø"&×"8Ñ"8ØŸ-™-×0¨5Ø—j‘jØ#×2Ñ2Ø×,Ñ,ñ%ˆDÔ!ð �~�~ $×"7Ñ"7×"C×"CØ×%Ñ%×1Ñ1×6Ñ6Ù<ØØ!Ÿ^™^Ð,ØØ#1ð 7ò ð #Dˆ~ð1 ùò ùò
!s   ¡E¾EÁEÁ1Ec                ó"   • U R                  5       $ r~   )Ú__repr__rô   s    r6   Ú__str__ÚInterface.__str__°  s   € Ø�}‰}‹Ðr8   c                óÌ   • SU R                    3nUSS[        U5      -   3-  nUS-  nU R                   H  nUSU 3-  nM     US-  nU R                   H  nUSU 3-  nM     U$ )NzGradio Interface for: Ú
Ú-z
inputs:z
|-z	
outputs:)rq   r£   r    r¡   )rÖ   Úreprrß   s      r6   rF  ÚInterface.__repr__³  s‡   € Ø'¨¯© Ð7ˆØ�"�Sœ3˜t›9‘_Ð%Ð&Ñ&ˆØ�ÑˆØ×.Ô.ˆIØ�d˜9˜+Ð&Ñ&ŠDñ /à�ÑˆØ×/Ô/ˆIØ�d˜9˜+Ð&Ñ&ŠDñ 0àˆr8   )0rq   r�   r§   rV   rT   r®   rS   rR   rJ   rP   rB   rC   r·   rW   rÕ   rb   rI   rE   r´   r?  rD   r¿   rN   rM   rK   rL   rr   r¯   rÀ   r    r™   rG   r¾   rŸ   rQ   r¡   rF   r¼   r½   r^   r²   r¸   r¶   ra   rµ   r`   rH   rc   )r2   zPipeline | DiffusionPipelineÚreturnr,   r~   )Lrr   r   r’   ú2str | Component | Sequence[str | Component] | Noner“   rO  r´   z(list[Any] | list[list[Any]] | str | NonerB   úbool | NonerC   zLiteral['eager', 'lazy'] | NonerD   ÚintrE   úlist[str] | NonerF   zint | Literal[False]rG   ÚboolrH   zstr | I18nData | NonerI   ú
str | NonerJ   rT  rK   z=Literal['never'] | Literal['auto'] | Literal['manual'] | NonerL   z(list[str] | list[tuple[str, str]] | NonerM   r€   rN   zFlaggingCallback | NonerO   rP  rP   rS  rQ   rQ  rR   z,Literal['public', 'private', 'undocumented']rS   rT  rT   zstr | None | Literal[False]rU   rS  rV   rS  rW   zint | None | Literal['default']rX   rO  rY   zstr | Accordion | NonerZ   ústr | Buttonr[   rU  r\   zstr | Button | Noner]   ztuple[int, int] | Noner^   z$Literal['full', 'minimal', 'hidden']r_   rS  r`   z
int | Nonera   Úfloatrb   z"str | DeepLinkButton | bool | Nonerc   zCallable | None)rN  ÚNone)rN  zlist[Button])rN  zTtuple[Button | None, ClearButton | None, Button | None, list[Button] | None, Column])r  úButton | NonerN  z\tuple[Button | None, ClearButton | None, DuplicateButton | None, Button | None, list | None])rä   rX  ræ   rX  rN  r   )rå   r   ré   zColumn | None)rç   zlist[Button] | Nonerå   r   rî   r   )rq   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úclassmethodr(   r–   rË   rø   rÌ   rÍ   rÓ   rÎ   rÏ   rÐ   rÒ   rG  rF  Ú__static_attributes__Ú__classcell__©rï   s   @r6   r,   r,   )   s  ø† ñð& ðØ3ðà	óó ðð4 >BðJ-ð '+Ø6:Ø!#Ø+/Ø01ØØ'+Ø"&Ø"ð ØEIØ-Ø59Ø)-ØØØGOØ#Ø7;ØØ"'Ø=FØPTØ>BØ#+Ø!'Ø)0Ø/3Ø>DØ Ø!#Ø!Ø8<Ø%)ñWJ-àðJ-ð CðJ-ð Dð	J-ð
 ;ðJ-ð $ðJ-ð 4ðJ-ð ðJ-ð )ðJ-ð .ðJ-ð ðJ-ð %ðJ-ð  ðJ-ð ðJ-ð ð!J-ð( Cð)J-ð* ð+J-ð, 3ð-J-ð. 'ð/J-ð0 ð1J-ð2 ð3J-ð4 Eð5J-ð6 ð7J-ð8 5ð9J-ð: ð;J-ð<  ð=J-ð> ;ð?J-ð@ NðAJ-ðB &<ðCJ-ðD !ðEJ-ðF ðGJ-ðH 'ðIJ-ðJ -ðKJ-ðL <ðMJ-ðN ðOJ-ðP ðQJ-ðR ðSJ-ðT 6ðUJ-ðV #÷WJ-ñ J-ôX'ôEð>
ð
ô>
ð@6
à%ð6
ð
ô6
òp#ðGØ(ðGØ5BðGà	÷GðR
àð
ð !.ô
ð2Cà&ðCð  ðCð "ô	CòJ òD÷	ð 	r8   r,   c                  óH   ^ • \ rS rSrSr   S       SU 4S jjjrSrU =r$ )ÚTabbedInterfacei¿  zã
A TabbedInterface is created by providing a list of Interfaces or Blocks, each of which gets
rendered in a separate tab. Only the components from the Interface/Blocks will be rendered in the tab.

Demos: tabbed_interface_lite
c           	     óø  >• [         TU ]  U=(       d    SUSSS9  Uc'  [        [        U5      5       Vs/ s H  nSU 3PM
     nnU    U(       a  [	        SU S35        [        5          [        XS	S
9 H;  u  pg[        UUR                  (       a  SOSS9   UR                  5         SSS5        M=     SSS5        SSS5        gs  snf ! , (       d  f       Md  = f! , (       d  f       N.= f! , (       d  f       g= f)a×  
Parameters:
    interface_list: A list of Interfaces (or Blocks) to be rendered in the tabs.
    tab_names: A list of tab names. If None, the tab names will be "Tab 1", "Tab 2", etc.
    title: The tab title to display when this demo is opened in a browser window.
    analytics_enabled: Whether to allow basic telemetry. If None, will use GRADIO_ANALYTICS_ENABLED environment variable or default to True.
Returns:
    a Gradio Tabbed Interface for the given interfaces
re   Útabbed_interfaceT)rH   rO   rf   Úfill_heightNzTab rò   ró   Fro   rl   )rm   r  )
r•   r–   Úranger£   r   r"   r«   r!   re  rh   )	rÖ   Úinterface_listÚ	tab_namesrH   rO   r×   r5   Útab_namerï   s	           €r6   r–   ÚTabbedInterface.__init__È  së   ø€ ô  	‰ÑØ×#˜8Ø/Ø#Øð	 	ñ 	
ð ÑÜ-2´3°~Ó3FÔ-GÓHÒ-G¨˜4 ˜s›Ñ-GˆIÐHÚÞÜØJÈ5È'ÐQVÐWôô •Ü+.¨~ÐQVÔ+WÑ'�IÜØ&Ø#,×#8×#8™a¸dóð "×(Ñ(Ô*÷	ñ ñ ,X÷ ÷ ˆTùò I÷ö ú÷ •ú÷ �TúsA   ´CÁ!C+Á(-CÂC	Â&CÂ2C+Ã
CÃCÃ
C(	Ã$C+Ã+
C9r/   )NNN)rg  zSequence[Blocks]rh  rR  rH   rT  rO   rP  )rq   rY  rZ  r[  r\  r–   r^  r_  r`  s   @r6   rb  rb  ¿  sC   ø† ñð '+Ø Ø)-ð#+à(ð#+ð $ð#+ð ð	#+ð
 '÷#+ö #+r8   rb  c                ó„   • [         R                  " 5        H'  nUR                  (       d  M  UR                  U 5        M)     g r~   )r   Úget_instancesÚ
is_runningÚclose)ÚverboseÚinstances     r6   Ú	close_allrq  î  s-   € Ü×(Ò(Ö*ˆØ××ÑØ�N‰N˜7Ö#ò +r8   )T)ro  rS  rN  rW  );r\  Ú
__future__r   rÂ   r-  r¹   r¥   Úcollections.abcr   r   Útypingr   r   r   Úgradio_client.documentationr	   Úgradior
   r   Úgradio.blocksr   Úgradio.componentsr   r   r   r   r   r   r   r   Úgradio.data_classesr   Úgradio.eventsr   r   r   Úgradio.exceptionsr   Úgradio.flaggingr   r   r   Úgradio.i18nr   Úgradio.layoutsr   r   r    r!   r"   Úgradio.pipelinesr#   Ú	diffusersr$   Útransformers.pipelines.baser%   r,   rb  rq  r/   r8   r6   Ú<module>r‚     sµ   ðñõ #ã Û Û 	Û ß .ß .Ñ .å 0ç "Ý  ÷	÷ 	ó 	õ /ß 0Ñ 0Ý )ß CÑ CÝ  ß <Õ <Ý /æÝ+Ý4ñ 
ˆ(�F˜O¨[¸'ÓBôR�ó Ró CðRñj 
ƒô++�fó ++ó ð++÷\$r8   