
    ~Wh
                     D    d Z ddlZddlZddlmc mZ ddlmZ d Z	d Z
dS )z5Saving utilities to support Python's Pickle protocol.    N)
saving_libc                    t          j                    }	 t          j                            |d          }t          |d          5 }|                    |            ddd           n# 1 swxY w Y   t          j        |d          }|t          j
        j                            |           S # t          $ r}|d}~ww xY w# t          j
        j                            |           w xY w)zReconstruct a Model from the output of `serialize_model_as_bytecode`.

    Args:
        serialized_model: (bytes) return value from
          `serialize_model_as_bytecode`.

    Returns:
        Keras Model instance.
    model.keraswbNF)	safe_mode)tempfilemkdtempospathjoinopenwriter   
load_modeltfiogfilermtree	Exception)serialized_modeltemp_dirfilepathfmodeles         _/var/www/html/movieo_spanner_bot/venv/lib/python3.11/site-packages/keras/saving/pickle_utils.pydeserialize_model_from_bytecoder      s    !!H%7<<-88(D!! 	&QGG$%%%	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& %h%@@@ 
8$$$$    
 	8$$$$sM   0B. A'B. 'A++B. .A+/B. C .
B?8B::B??C &C(c                    t          j                    }	 t          j                            |d          }t          j        | |           t          |d          5 }|                                }ddd           n# 1 swxY w Y   |t          j
        j                            |           S # t          $ r}|d}~ww xY w# t          j
        j                            |           w xY w)zConvert a Keras Model into a bytecode representation for pickling.

    Args:
        model: Keras Model instance.

    Returns:
        Tuple that can be read by `deserialize_from_bytecode`.
    r   rbN)r   r	   r
   r   r   r   
save_modelr   readr   r   r   r   r   )r   r   r   r   datar   s         r   serialize_model_as_bytecoder"   7   s    !!H
%7<<-88eX...(D!! 	Q6688D	 	 	 	 	 	 	 	 	 	 	 	 	 	 	
 
8$$$$    
 	8$$$$sN   AB, A;/B, ;A??B, A?B, C  ,
B=6B88B==C   &C&)__doc__r
   r   tensorflow.compat.v2compatv2r   keras.savingr   r   r"        r   <module>r*      st    < ; 				  ! ! ! ! ! ! ! ! ! # # # # # #% % %>% % % % %r)   