o
    $i                     @   s   d dl Z d dlmZ d dlmZ d dlmZ d dlmZ d dl	m
Z
 z
d dlmZmZ W n ey8   ed  w e eZe
d	d
G dd deZeeZdS )    N)Callable)serve)SERVE_LOGGER_NAME)ASGIAppReplicaWrapper)	PublicAPI)BlocksrouteszCGradio isn't installed. Run `pip install gradio` to install Gradio.alpha)	stabilityc                       s.   e Zd ZdZdeg ef f fddZ  ZS )GradioIngressz@User-facing class that wraps a Gradio App in a Serve Deployment.builderc                    s   | }t  tj| dS )zBuilds and wraps an ASGI app from the provided builder.

        The builder should take no arguments and return a Gradio App (of type Interface
        or Blocks).
        N)super__init__r   App
create_app)selfr   io	__class__ Z/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/ray/serve/gradio_integrations.pyr      s   zGradioIngress.__init__)__name__
__module____qualname____doc__r   r   r   __classcell__r   r   r   r   r      s    "r   )loggingtypingr   rayr   ray.serve._private.constantsr   ray.serve._private.http_utilr   ray.util.annotationsr   gradior   r   ModuleNotFoundErrorprint	getLoggerloggerr   
deploymentGradioServerr   r   r   r   <module>   s     
