§
    ‚ŠtjC  ã                   óô   — d dl Z d dlZd dlZddlmZ ddlmZmZm	Z	 ddl
mZmZmZmZmZ  e¦   «         rd dlZddlmZmZ  G d„ d	e¦  «        Z e ed
¬¦  «        ¦  «         G d„ de¦  «        ¦   «         ZdS )é    Né   )ÚGenerationConfig)Úadd_end_docstringsÚis_torch_availableÚrequires_backendsé   )ÚArgumentHandlerÚDatasetÚPipelineÚPipelineExceptionÚbuild_pipeline_init_args)Ú,MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING_NAMESÚ0MODEL_FOR_TABLE_QUESTION_ANSWERING_MAPPING_NAMESc                   ó   — e Zd ZdZdd„ZdS )Ú%TableQuestionAnsweringArgumentHandlerzB
    Handles arguments for the TableQuestionAnsweringPipeline
    Nc                 óÆ  — t          | d¦  «         dd l}|€t          d¦  «        ‚|�€]t          |t          ¦  «        r/|                     d¦  «        �|                     d¦  «        �|g}�nt          |t          ¦  «        r¬t          |¦  «        dk    r™t          d„ |D ¦   «         ¦  «        st          dd„ |D ¦   «         › �¦  «        ‚|d                              d¦  «        �|d                              d¦  «        �|}n‰t          d	|d          	                    ¦   «         › d
�¦  «        ‚t          �t          |t          ¦  «        st          |t          j        ¦  «        r|S t          dt          |¦  «        › d�¦  «        ‚||dœg}|D ]R}t          |d         |j        ¦  «        s5|d         €t          d¦  «        ‚|                     |d         ¦  «        |d<   ŒS|S )NÚpandasr   z(Keyword argument `table` cannot be None.ÚqueryÚtablec              3   ó@   K  — | ]}t          |t          ¦  «        V — Œd S ©N)Ú
isinstanceÚdict©Ú.0Úds     úm/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/transformers/pipelines/table_question_answering.pyú	<genexpr>zATableQuestionAnsweringArgumentHandler.__call__.<locals>.<genexpr>-   s,   è è € Ð>Ð>°1�: a­Ñ.Ô.Ð>Ð>Ð>Ð>Ð>Ð>ó    z:Keyword argument `table` should be a list of dict, but is c              3   ó4   K  — | ]}t          |¦  «        V — Œd S r   )Útyper   s     r   r   zATableQuestionAnsweringArgumentHandler.__call__.<locals>.<genexpr>/   s-   è è € ÐUmÐUmÐbcÕVZÐ[\ÑV]ÔV]ÐUmÐUmÐUmÐUmÐUmÐUmr   z‹If keyword argument `table` is a list of dictionaries, each dictionary should have a `table` and `query` key, but only dictionary has keys z `table` and `query` keys.zZInvalid input. Keyword argument `table` should be either of type `dict` or `list`, but is ú))r   r   zTable cannot be None.)r   r   Ú
ValueErrorr   r   ÚgetÚlistÚlenÚallÚkeysr
   ÚtypesÚGeneratorTyper!   Ú	DataFrame)Úselfr   r   ÚkwargsÚpdÚtqa_pipeline_inputsÚtqa_pipeline_inputs          r   Ú__call__z.TableQuestionAnsweringArgumentHandler.__call__   s2  € õ 	˜$ Ñ)Ô)Ð)ØÐÐÐàˆ=ÝÐGÑHÔHÐHØ‰]Ý˜%¥Ñ&Ô&ð ¨5¯9ª9°WÑ+=Ô+=Ð+IÈeÏiÊiÐX_ÑN`ÔN`ÐNlØ', gÐ#Ñ#Ý˜E¥4Ñ(Ô(ð ­S°©Z¬Z¸!ª^¨^ÝÐ>Ð>¸Ð>Ñ>Ô>Ñ>Ô>ð Ý$ØoÐUmÐUmÐglÐUmÑUmÔUmÐoÐoñô ð ð ˜”8—<’< Ñ(Ô(Ð4¸¸q¼¿ºÀgÑ9NÔ9NÐ9ZØ*/Ð'Ð'å$ðvØJOÐPQÌ(Ï-Ê-É/Ì/ðvð vð vñô ð õ Ð$­°E½7Ñ)CÔ)CÐ$ÅzÐRWÕY^ÔYlÑGmÔGmÐ$Ø�å ð)Ý˜u™+œ+ð)ð )ð )ñô ð ð
 .3¸UÐ#CÐ#CÐ"DÐà"5ð 	Xð 	XÐÝÐ0°Ô9¸2¼<ÑHÔHð XØ% gÔ.Ð6Ý$Ð%<Ñ=Ô=Ð=à.0¯lªlÐ;MÈgÔ;VÑ.WÔ.WÐ" 7Ñ+øà"Ð"r   )NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r1   © r   r   r   r      s2   € € € € € ðð ð-#ð -#ð -#ð -#ð -#ð -#r   r   T)Úhas_tokenizerc                   óš   ‡ — e Zd ZdZdZdZdZdZdZdZ	 e
d¬¦  «        Z e¦   «         fˆ fd„	Zd„ Zd	„ Zˆ fd
„Zdd„Zdd„Zdd„Zd„ Zˆ xZS )ÚTableQuestionAnsweringPipelineaÌ  
    Table Question Answering pipeline using a `ModelForTableQuestionAnswering`. This pipeline is only available in
    PyTorch.

    Unless the model you're using explicitly sets these generation parameters in its configuration files
    (`generation_config.json`), the following default values will be used:
    - max_new_tokens: 256

    Example:

    ```python
    >>> from transformers import pipeline

    >>> oracle = pipeline(model="google/tapas-base-finetuned-wtq")
    >>> table = {
    ...     "Repository": ["Transformers", "Datasets", "Tokenizers"],
    ...     "Stars": ["36542", "4512", "3934"],
    ...     "Contributors": ["651", "77", "34"],
    ...     "Programming language": ["Python", "Python", "Rust, Python and NodeJS"],
    ... }
    >>> oracle(query="How many stars does the transformers repository have?", table=table)
    {'answer': 'AVERAGE > 36542', 'coordinates': [(0, 1)], 'cells': ['36542'], 'aggregator': 'AVERAGE'}
    ```

    Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

    This tabular question answering pipeline can currently be loaded from [`pipeline`] using the following task
    identifier: `"table-question-answering"`.

    The models that this pipeline can use are models that have been fine-tuned on a tabular question answering task.
    See the up-to-date list of available models on
    [huggingface.co/models](https://huggingface.co/models?filter=table-question-answering).
    ztable,queryTFé   )Úmax_new_tokensc                 óˆ  •—  t          ¦   «         j        di |¤Ž || _        t          j        ¦   «         }|                     t          ¦  «         |                      |¦  «         t          | j	        j
        dd ¦  «        ot          | j	        j
        dd ¦  «        | _        t          | j	        j
        d¦  «        rdnd | _        d S )NÚaggregation_labelsÚnum_aggregation_labelsÚtapasr6   )ÚsuperÚ__init__Ú_args_parserr   ÚcopyÚupdater   Úcheck_model_typeÚgetattrÚmodelÚconfigÚ	aggregateÚhasattrr!   )r,   Úargs_parserr-   ÚmappingÚ	__class__s       €r   rA   z'TableQuestionAnsweringPipeline.__init__}   s¾   ø€ Ø�‰ŒÔÐ"Ð"˜6Ð"Ð"Ð"Ø'ˆÔåBÔGÑIÔIˆØ�ŠÕCÑDÔDÐDØ×Ò˜gÑ&Ô&Ð&å  ¤Ô!2Ð4HÈ$ÑOÔOð 
ÕT[ØŒJÔÐ7¸ñU
ô U
ˆŒõ  ' t¤zÔ'8Ð:NÑOÔOÐY�G�GÐUYˆŒ	ˆ	ˆ	r   c                 ó   —  | j         di |¤ŽS )Nr6   )rG   )r,   Úinputss     r   Úbatch_inferencez.TableQuestionAnsweringPipeline.batch_inferenceŠ   s   € ØˆtŒzÐ#Ð#˜FÐ#Ð#Ð#r   c                 óŒ  ‡— g }g }d}|d         j         d         }|d                              | j        ¦  «        }|d                              | j        ¦  «        }|d                              | j        ¦  «        }d}	t          |¦  «        D �]h}
|��W|	dd…df         }t	          j        |                     ¦   «                              ¦   «         ¦  «        }||
         }	t          |j         d         ¦  «        D ] }|	dd…df                              ¦   «         |         }|	dd…df                              ¦   «         |         dz
  }|	dd…df                              ¦   «         |         dz
  }|dk    r&|dk    r |dk    rt          |||f         ¦  «        ||<   Œ¡t          j        |¦  «                             t          j        ¦  «                             | j        ¦  «        |	dd…df<   ||
         }||
         }||
         }	|                      |                     d¦  «        |                     d¦  «        |	                     d¦  «        ¬	¦  «        }|j        }| j        r|                     |j        ¦  «         |                     |¦  «         t          j                             |¬
¦  «        }|j        |                     t          j        ¦  «                             |j        j        ¦  «        z  }t1          j        t4          ¦  «        Št7          |                     ¦   «                              ¦   «         ¦  «        D ]¦\  }}|	dd…df                              ¦   «         |         }|	dd…df                              ¦   «         |         dz
  }|	dd…df                              ¦   «         |         dz
  }|dk    r)|dk    r#|dk    r‰||f                              |¦  «         Œ§ˆfd„‰D ¦   «         }�Œjt          j        t=          |¦  «        d¦  «        }| j        s|fn#|t          j        t=          |¦  «        d¦  «        fS )zµ
        Inference used for models that need to process sequences in a sequential fashion, like the SQA models which
        handle conversational query related to a table.
        NÚ	input_idsr   Úattention_maskÚtoken_type_idsé   r   r   )rR   rS   rT   )Úlogitsc                 ór   •— i | ]3}|t          j        ‰|         ¦  «                             ¦   «         d k    “Œ4S )g      à?)ÚnpÚarrayÚmean)r   ÚkeyÚcoords_to_probss     €r   ú
<dictcomp>zGTableQuestionAnsweringPipeline.sequential_inference.<locals>.<dictcomp>Ê   s<   ø€ ÐhÐhÐhÐQT˜C¥¤¨/¸#Ô*>Ñ!?Ô!?×!DÒ!DÑ!FÔ!FÈÒ!LÐhÐhÐhr   )ÚshapeÚtoÚdeviceÚrangerX   Ú
zeros_likeÚcpuÚnumpyÚtolistÚintÚtorchÚ
from_numpyr!   ÚlongrG   Ú	unsqueezerV   rI   ÚappendÚlogits_aggregationÚdistributionsÚ	BernoulliÚprobsÚfloat32ÚcollectionsÚdefaultdictr%   Ú	enumerateÚsqueezeÚcatÚtuple)r,   rO   Ú
all_logitsÚall_aggregationsÚprev_answersÚ
batch_sizerR   rS   rT   Útoken_type_ids_exampleÚindexÚprev_labels_exampleÚmodel_labelsÚiÚ
segment_idÚcol_idÚrow_idÚinput_ids_exampleÚattention_mask_exampleÚoutputsrV   Údist_per_tokenÚprobabilitiesÚpÚcolÚrowÚlogits_batchr\   s                              @r   Úsequential_inferencez3TableQuestionAnsweringPipeline.sequential_inference�   s?  ø€ ð
 ˆ
ØÐØˆØ˜KÔ(Ô.¨qÔ1ˆ
à˜;Ô'×*Ò*¨4¬;Ñ7Ô7ˆ	ØÐ 0Ô1×4Ò4°T´[ÑAÔAˆØÐ 0Ô1×4Ò4°T´[ÑAÔAˆØ!%Ðå˜:Ñ&Ô&ð .	iñ .	iˆEð Ñ'Ø&<¸Q¸Q¸QÀ¸TÔ&BÐ#Ý!œ}Ð-@×-DÒ-DÑ-FÔ-F×-LÒ-LÑ-NÔ-NÑOÔO�à)7¸Ô)>Ð&Ý˜|Ô1°!Ô4Ñ5Ô5ð Nð N�AØ!7¸¸¸¸1¸Ô!=×!DÒ!DÑ!FÔ!FÀqÔ!I�JØ3°A°A°A°q°DÔ9×@Ò@ÑBÔBÀ1ÔEÈÑI�FØ3°A°A°A°q°DÔ9×@Ò@ÑBÔBÀ1ÔEÈÑI�Fà ’{�{ v°¢{ {°zÀQ²°Ý*-¨l¸FÀFÐ;KÔ.LÑ*MÔ*M˜ Q™øå/4Ô/?ÀÑ/MÔ/M×/RÒ/RÕSXÔS]Ñ/^Ô/^×/aÒ/aÐbfÔbmÑ/nÔ/nÐ& q q q¨! tÑ,à )¨%Ô 0ÐØ%3°EÔ%:Ð"Ø%3°EÔ%:Ð"Ø—j’jØ+×5Ò5°aÑ8Ô8Ø5×?Ò?ÀÑBÔBØ5×?Ò?ÀÑBÔBð !ñ ô ˆGð
 ”^ˆFàŒ~ð DØ ×'Ò'¨Ô(BÑCÔCÐCà×Ò˜fÑ%Ô%Ð%å"Ô0×:Ò:À&Ð:ÑIÔIˆNØ*Ô0Ð3I×3NÒ3NÍuÌ}Ñ3]Ô3]×3`Ò3`ØÔ$Ô+ñ4ô 4ñ ˆMõ *Ô5µdÑ;Ô;ˆOÝ! -×"7Ò"7Ñ"9Ô"9×"@Ò"@Ñ"BÔ"BÑCÔCð :ð :‘��1Ø3°A°A°A°q°DÔ9×@Ò@ÑBÔBÀ1ÔE�
Ø,¨Q¨Q¨Q°¨TÔ2×9Ò9Ñ;Ô;¸AÔ>ÀÑB�Ø,¨Q¨Q¨Q°¨TÔ2×9Ò9Ñ;Ô;¸AÔ>ÀÑB�Ø˜!’8�8  q¢ ¨Z¸1ª_¨_Ø# S¨# JÔ/×6Ò6°qÑ9Ô9Ð9øàhÐhÐhÐhÐXgÐhÑhÔhˆL‰Lå”y¥ zÑ!2Ô!2°AÑ6Ô6ˆà&*¤nÐo�ˆˆ¸<ÍÌÕSXÐYiÑSjÔSjÐlmÑInÔInÐ:oÐor   c                 óŒ   •—  | j         |i |¤Ž} t          ¦   «         j        |fi |¤Ž}t          |¦  «        dk    r|d         S |S )a  
        Answers queries according to a table. The pipeline accepts several types of inputs which are detailed below:

        - `pipeline(table, query)`
        - `pipeline(table, [query])`
        - `pipeline(table=table, query=query)`
        - `pipeline(table=table, query=[query])`
        - `pipeline({"table": table, "query": query})`
        - `pipeline({"table": table, "query": [query]})`
        - `pipeline([{"table": table, "query": query}, {"table": table, "query": query}])`

        The `table` argument should be a dict or a DataFrame built from that dict, containing the whole table:

        Example:

        ```python
        data = {
            "actors": ["brad pitt", "leonardo di caprio", "george clooney"],
            "age": ["56", "45", "59"],
            "number of movies": ["87", "53", "69"],
            "date of birth": ["7 february 1967", "10 june 1996", "28 november 1967"],
        }
        ```

        This dictionary can be passed in as such, or can be converted to a pandas DataFrame:

        Example:

        ```python
        import pandas as pd

        table = pd.DataFrame.from_dict(data)
        ```

        Args:
            table (`pd.DataFrame` or `Dict`):
                Pandas DataFrame or dictionary that will be converted to a DataFrame containing all the table values.
                See above for an example of dictionary.
            query (`str` or `list[str]`):
                Query or list of queries that will be sent to the model alongside the table.
            sequential (`bool`, *optional*, defaults to `False`):
                Whether to do inference sequentially or as a batch. Batching is faster, but models like SQA require the
                inference to be done sequentially to extract relations within sequences, given their conversational
                nature.
            padding (`bool`, `str` or [`~utils.PaddingStrategy`], *optional*, defaults to `False`):
                Activates and controls padding. Accepts the following values:

                - `True` or `'longest'`: Pad to the longest sequence in the batch (or no padding if only a single
                  sequence if provided).
                - `'max_length'`: Pad to a maximum length specified with the argument `max_length` or to the maximum
                  acceptable input length for the model if that argument is not provided.
                - `False` or `'do_not_pad'` (default): No padding (i.e., can output a batch with sequences of different
                  lengths).

            truncation (`bool`, `str` or [`TapasTruncationStrategy`], *optional*, defaults to `False`):
                Activates and controls truncation. Accepts the following values:

                - `True` or `'drop_rows_to_fit'`: Truncate to a maximum length specified with the argument `max_length`
                  or to the maximum acceptable input length for the model if that argument is not provided. This will
                  truncate row by row, removing rows from the table.
                - `False` or `'do_not_truncate'` (default): No truncation (i.e., can output batch with sequence lengths
                  greater than the model maximum admissible input size).


        Return:
            A dictionary or a list of dictionaries containing results: Each result is a dictionary with the following
            keys:

            - **answer** (`str`) -- The answer of the query given the table. If there is an aggregator, the answer will
              be preceded by `AGGREGATOR >`.
            - **coordinates** (`list[tuple[int, int]]`) -- Coordinates of the cells of the answers.
            - **cells** (`list[str]`) -- List of strings made up of the answer cell values.
            - **aggregator** (`str`) -- If the model has an aggregator, this returns the aggregator.
        r   r   )rB   r@   r1   r&   )r,   Úargsr-   Úpipeline_inputsÚresultsrM   s        €r   r1   z'TableQuestionAnsweringPipeline.__call__Ð   s[   ø€ ðV ,˜$Ô+¨TÐ<°VÐ<Ð<ˆà"•%‘'”'Ô" ?Ð=Ð=°fÐ=Ð=ˆÝˆw‰<Œ<˜1ÒÐØ˜1”:ÐØˆr   Nc                 ó¾   — i }|�||d<   |�||d<   i }|�||d<   t          | dd ¦  «        �
| j        |d<   t          | dd ¦  «        �| j        |d<   | j        |d<   ||i fS )NÚpaddingÚ
truncationÚ
sequentialÚassistant_modelÚassistant_tokenizerÚ	tokenizer)rF   r•   r—   r–   )r,   r”   r’   r“   r-   Úpreprocess_paramsÚforward_paramss          r   Ú_sanitize_parametersz3TableQuestionAnsweringPipeline._sanitize_parameters"  sš   € ØÐØÐØ+2Ð˜iÑ(ØÐ!Ø.8Ð˜lÑ+àˆØÐ!Ø+5ˆN˜<Ñ(å�4Ð*¨DÑ1Ô1Ð=Ø04Ô0DˆNÐ,Ñ-Ý�4Ð.°Ñ5Ô5ÐAØ*.¬.ˆN˜;Ñ'Ø48Ô4LˆNÐ0Ñ1à  .°"Ð4Ð4r   c                 óâ   — |€| j         dk    rd}nd}|d         |d         }}|j        rt          d¦  «        ‚|�|dk    rt          d¦  «        ‚|                      ||d	||¬
¦  «        }||d<   |S )Nr?   Údrop_rows_to_fitÚdo_not_truncater   r   ztable is emptyÚ zquery is emptyÚpt)Úreturn_tensorsr“   r’   )r!   Úemptyr#   r—   )r,   Úpipeline_inputr’   r“   r   r   rO   s          r   Ú
preprocessz)TableQuestionAnsweringPipeline.preprocess5  s“   € ØÐØŒy˜GÒ#Ð#Ø/�
�
à.�
à% gÔ.°¸wÔ0GˆuˆØŒ;ð 	/ÝÐ-Ñ.Ô.Ð.Øˆ=˜E RšK˜KÝÐ-Ñ.Ô.Ð.Ø—’  u¸TÈjÐbi�ÑjÔjˆØˆˆw‰Øˆr   c                 óÒ   — |                      d¦  «        }| j        dk    r|r | j        di |¤Ž}n0 | j        di |¤Ž}n"d|vr
| j        |d<    | j        j        di |¤|¤Ž}|||dœ}|S )Nr   r?   Úgeneration_config)Úmodel_inputsr   r…   r6   )Úpopr!   rŒ   rP   r¥   rG   Úgenerate)r,   r¦   r”   Úgenerate_kwargsr   r…   Úmodel_outputss          r   Ú_forwardz'TableQuestionAnsweringPipeline._forwardE  s®   € Ø× Ò  Ñ)Ô)ˆàŒ9˜ÒÐØð ?Ø3˜$Ô3ÐCÐC°lÐCÐC��à.˜$Ô.Ð>Ð>°Ð>Ð>��ð #¨/Ð9Ð9Ø7;Ô7M�Ð 3Ñ4à)�d”jÔ)ÐLÐL¨LÐL¸OÐLÐLˆGØ)5ÀÐRYÐZÐZˆØÐr   c                 óº  ‡ ‡‡‡— |d         }|d         Š|d         }‰ j         dk    �rq‰ j        rw|d d…         \  }}‰ j                             |||¦  «        }|\  }}ˆ fd„t	          |¦  «        D ¦   «         Š‰ j        j        j        Šˆˆfd„t	          |¦  «        D ¦   «         }	n/|d         }‰ j                             ||¦  «        }|d         }i Ši }	g }
t	          |¦  «        D ]ƒ\  }}ˆfd	„|D ¦   «         }‰                     |d
¦  «        }|	                     |d
¦  «        }|d 	                    |¦  «        z   |ˆfd„|D ¦   «         dœ}|r||d<   |
 
                    |¦  «         Œ„t          |¦  «        dk    rt          d‰ j        j        d¦  «        ‚n&d„ ‰ j                             |d¬¦  «        D ¦   «         }
t          |
¦  «        dk    r|
n|
d         S )Nr¦   r   r…   r?   r   c                 óF   •— i | ]\  }}|‰j         j        j        |         “ŒS r6   )rG   rH   r=   )r   r   Úpredr,   s      €r   r]   z>TableQuestionAnsweringPipeline.postprocess.<locals>.<dictcomp>_  s/   ø€ ÐwÐwÐwÑQXÐQRÐTX˜q $¤*Ô"3Ô"FÀtÔ"LÐwÐwÐwr   c                 ó:   •— i | ]\  }}|‰k    ¯|‰|         d z   “ŒS )z > r6   )r   r   r®   ÚaggregatorsÚno_agg_label_indexs      €€r   r]   z>TableQuestionAnsweringPipeline.postprocess.<locals>.<dictcomp>b  s;   ø€ ð &ð &ð &Ù29°!°TÐ[_ÐcuÒ[uÐ[u�A�{ 1”~¨Ñ-Ð[uÐ[uÐ[ur   r   c                 ó*   •— g | ]}‰j         |         ‘ŒS r6   ©Úiat©r   Ú
coordinater   s     €r   ú
<listcomp>z>TableQuestionAnsweringPipeline.postprocess.<locals>.<listcomp>m  s    ø€ ÐMÐMÐM°:˜œ :Ô.ÐMÐMÐMr   rž   z, c                 ó*   •— g | ]}‰j         |         ‘ŒS r6   r³   rµ   s     €r   r·   z>TableQuestionAnsweringPipeline.postprocess.<locals>.<listcomp>s  s    ø€ ÐRÐRÐR¸
˜eœi¨
Ô3ÐRÐRÐRr   )ÚanswerÚcoordinatesÚcellsÚ
aggregatorzTable question answeringzEmpty answerc                 ó   — g | ]}d |i‘ŒS )r¹   r6   )r   r¹   s     r   r·   z>TableQuestionAnsweringPipeline.postprocess.<locals>.<listcomp>|  s   € ÐwÐwÐw¨f˜ &Ð)ÐwÐwÐwr   T)Úskip_special_tokensr   )r!   rI   r—   Úconvert_logits_to_predictionsrs   rG   rH   Úno_aggregation_label_indexr$   Újoinrk   r&   r   Úname_or_pathÚbatch_decode)r,   rª   rO   r…   rV   Ú
logits_aggÚpredictionsÚanswer_coordinates_batchÚagg_predictionsÚaggregators_prefixÚanswersr|   rº   r»   r¼   Úaggregator_prefixr¹   r°   r±   r   s   `                @@@r   Úpostprocessz*TableQuestionAnsweringPipeline.postprocessV  sV  øøøø€ Ø˜~Ô.ˆØ˜gÔ&ˆØ 	Ô*ˆØŒ9˜ÒÑØŒ~ð (Ø%,¨R¨a¨R¤[Ñ"�˜
Ø"œn×JÒJÈ6ÐSYÐ[eÑfÔf�Ø<GÑ9Ð(¨/ØwÐwÐwÐwÕ\eÐfuÑ\vÔ\vÐwÑwÔw�à%)¤ZÔ%6Ô%QÐ"ð&ð &ð &ð &ð &Ý=FÀÑ=WÔ=Wð&ñ &ô &Ð"Ð"ð ! œ�Ø"œn×JÒJÈ6ÐSYÑZÔZ�Ø+6°q¬>Ð(Ø �Ø%'Ð"ØˆGÝ&/Ð0HÑ&IÔ&Ið 'ð 'Ñ"��{ØMÐMÐMÐMÀÐMÑMÔM�Ø(Ÿ_š_¨U°BÑ7Ô7�
Ø$6×$:Ò$:¸5À"Ñ$EÔ$EÐ!à/°$·)²)¸EÑ2BÔ2BÑBØ#.ØRÐRÐRÐRÀkÐRÑRÔRðð �ð
 ð 6Ø+5�F˜<Ñ(à—’˜vÑ&Ô&Ð&Ð&Ý�6‰{Œ{˜aÒÐÝ'Ð(BÀDÄJÔD[Ð]kÑlÔlÐlð  ð xÐw¸¼×8SÒ8SÐT[ÐquÐ8SÑ8vÔ8vÐwÑwÔwˆGå˜g™,œ,¨Ò*Ð*ˆwˆw°¸´
Ð:r   )NNN)TN)F)r2   r3   r4   r5   Údefault_input_namesÚ_pipeline_calls_generateÚ_load_processorÚ_load_image_processorÚ_load_feature_extractorÚ_load_tokenizerr   Ú_default_generation_configr   rA   rP   rŒ   r1   rš   r£   r«   rË   Ú__classcell__)rM   s   @r   r9   r9   M   s+  ø€ € € € € ð ð  ðD (Ðà#ÐØ€OØ!ÐØ#ÐØ€Oà!1Ð!1Øð"ñ "ô "Ðð $IÐ#HÑ#JÔ#Jð Zð Zð Zð Zð Zð Zð$ð $ð $ðApð Apð ApðFPð Pð Pð Pð Pðd5ð 5ð 5ð 5ð&ð ð ð ð ð ð ð ð"(;ð (;ð (;ð (;ð (;ð (;ð (;r   r9   )rq   r)   rd   rX   Ú
generationr   Úutilsr   r   r   Úbaser	   r
   r   r   r   rg   Úmodels.auto.modeling_autor   r   r   r9   r6   r   r   ú<module>rØ      sl  ðØ Ð Ð Ð Ø €€€à Ð Ð Ð à )Ð )Ð )Ð )Ð )Ð )ðð ð ð ð ð ð ð ð ð ð
 bÐ aÐ aÐ aÐ aÐ aÐ aÐ aÐ aÐ aÐ aÐ aÐ aÐ að ÐÑÔð Ø€L€L€Lðð ð ð ð ð ð ð ð2#ð 2#ð 2#ð 2#ð 2#¨Oñ 2#ô 2#ð 2#ðj ÐÐ,Ð,¸4Ð@Ñ@Ô@ÑAÔAðp;ð p;ð p;ð p;ð p; Xñ p;ô p;ñ BÔAðp;ð p;ð p;r   