o
    1 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)Z	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   ZAppZ
create_app)selfr   io	__class__ i/home/app/PaddleOCR-VL-test/.venv_paddleocr/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   Zrayr   Zray.serve._private.constantsr   Zray.serve._private.http_utilr   Zray.util.annotationsr   Zgradior   r   ModuleNotFoundErrorprint	getLoggerloggerr
   Z
deploymentZGradioServerr   r   r   r   <module>   s     
