o
    ´©iI  ã                   @   s   d Z ddlZddlmZ ddlmZ ddlmZ ej d¡ Z	dur1ze	j
 W n	 ey0   e‚w ddlmZ dd	lmZ dd
lmZ ddlmZ G dd„ dƒZdd„ Zdd„ Zdd„ Zdd„ ZeeƒZeeƒZeeƒZeeƒZerŠddlmZ ddlmZ ddlmZ ddlmZ g d¢ZdS )Ú
é    N©ÚFunctionType)ÚTYPE_CHECKING)ÚCallableÚgradioé   )ÚGPU)Úgradio_auto_wrap)Údisable_gradio_auto_wrap)Úenable_gradio_auto_wrapc                   @   sf   e Zd Zdeg ef fdd„Zdd„ Zedd„ ƒZedd	„ ƒZ	ed
d„ ƒZ
edd„ ƒZedd„ ƒZ dS )ÚLazyImportedÚ	import_fnc                 C   s
   || _ d S ©N©r   )Úselfr   © r   úC/home/ubuntu/.local/lib/python3.10/site-packages/spaces/__init__.pyÚ__init__   s   
zLazyImported.__init__c                 O   s   |   ¡ |i |¤ŽS r   r   )r   ÚargsÚkwargsr   r   r   Ú__call__   s   zLazyImported.__call__c                 C   s   |   ¡ S r   r   ©r   r   r   r   Ú__wrapped__   ó   zLazyImported.__wrapped__c                 C   s
   |   ¡ jS r   )r   Ú__doc__r   r   r   r   r      s   
zLazyImported.__doc__c                 C   s   | j jS r   )r   Ú__code__r   r   r   r   r   "   r   zLazyImported.__code__c                 C   s   t S r   r   r   r   r   r   Ú	__class__%   s   zLazyImported.__class__c                 C   s   | j j d¡S )NÚ_)r   Ú__name__Úremoveprefixr   r   r   r   r   (   s   zLazyImported.__name__N)r   Ú
__module__Ú__qualname__r   r   r   r   Úpropertyr   r   r   r   r   r   r   r   r      s    



r   c                  C   ó   ddl m}  | S )Nr   ©Úaoti_capture)Úzero.torch.aotir&   r%   r   r   r   Ú_aoti_capture-   ó   r(   c                  C   r$   )Nr   ©Úaoti_compile)r'   r+   r*   r   r   r   Ú_aoti_compile1   r)   r,   c                  C   r$   )Nr   ©Ú
aoti_apply)r'   r.   r-   r   r   r   Ú_aoti_apply5   r)   r/   c                  C   r$   )Nr   ©Úaoti_blocks_load)r'   r1   r0   r   r   r   Ú_aoti_blocks_load9   r)   r2   r%   r*   r-   r0   )r	   r
   r   r   r&   r+   r.   r1   )r   ÚsysÚtypesr   Útypingr   r   ÚmodulesÚgetÚgrÚBlocksÚAttributeErrorÚImportErrorÚzero.decoratorr	   r   r
   r   r   r   r(   r,   r/   r2   r&   r+   r.   r1   r'   Ú__all__r   r   r   r   Ú<module>   s<    
ÿ