
    Wpf                     2    d Z ddlZddlZddlZdZdefdZdS )zMediaPipe Downloading utils.    Nz0https://storage.googleapis.com/mediapipe-assets/
model_pathc                    t           j                            t           j                            t
                                        t           j                  dd                   }t           j                            ||           }t           j                            |          rdS t          |                     d          d         z   }t          d|z              t          j                            |          5 }t          |d          5 }|j        dk    rt          d| z   d	z             t!          j        ||           ddd           n# 1 swxY w Y   ddd           dS # 1 swxY w Y   dS )
zUDownloads the oss model from Google Cloud Storage if it doesn't exist in the package.N/zDownloading model to wb   zCannot download z from Google Cloud Storage.)ossepjoinpathabspath__file__splitexists_GCS_URL_PREFIXprinturllibrequesturlopenopencodeConnectionErrorshutilcopyfileobj)r   mp_root_pathmodel_abspath	model_urlresponseout_files         i/var/www/html/nettyfy-visnx/env/lib/python3.11/site-packages/mediapipe/python/solutions/download_utils.pydownload_oss_modelr"      s    RW__X66<<RVDDSbSIJJ,',,|Z88-W^^M"" 
F
 0 0 5 5b 99)-/000~i(( +Hd=;?7A 7A +DL}.;9: ; ; ;
x***+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +s6   <E'6EE'E	E'E	E''E+.E+)__doc__r
   r   urllib.requestr   r   strr"        r!   <module>r(      sU    # " 				     D+3 + + + + + +r'   