Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	depecrated
Browse files- server/main.py +4 -4
    	
        server/main.py
    CHANGED
    
    | @@ -31,14 +31,14 @@ ERROR_MESSAGES = [ | |
| 31 | 
             
            class BasePipeline(Protocol):
         | 
| 32 | 
             
                class Info:
         | 
| 33 | 
             
                    @classmethod
         | 
| 34 | 
            -
                    def  | 
| 35 |  | 
| 36 | 
             
                    page_content: str | None
         | 
| 37 | 
             
                    input_mode: str
         | 
| 38 |  | 
| 39 | 
             
                class InputParams(ParamsModel):
         | 
| 40 | 
             
                    @classmethod
         | 
| 41 | 
            -
                    def  | 
| 42 |  | 
| 43 | 
             
                def predict(self, params: ParamsModel) -> Image.Image | None: ...
         | 
| 44 |  | 
| @@ -305,13 +305,13 @@ class App: | |
| 305 | 
             
                    # route to setup frontend
         | 
| 306 | 
             
                    @self.app.get("/api/settings")
         | 
| 307 | 
             
                    async def settings() -> JSONResponse:
         | 
| 308 | 
            -
                        info_schema = self.pipeline.Info. | 
| 309 | 
             
                        info = self.pipeline.Info()
         | 
| 310 | 
             
                        page_content = ""
         | 
| 311 | 
             
                        if hasattr(info, "page_content") and info.page_content:
         | 
| 312 | 
             
                            page_content = markdown2.markdown(info.page_content)
         | 
| 313 |  | 
| 314 | 
            -
                        input_params = self.pipeline.InputParams. | 
| 315 | 
             
                        return JSONResponse(
         | 
| 316 | 
             
                            {
         | 
| 317 | 
             
                                "info": info_schema,
         | 
|  | |
| 31 | 
             
            class BasePipeline(Protocol):
         | 
| 32 | 
             
                class Info:
         | 
| 33 | 
             
                    @classmethod
         | 
| 34 | 
            +
                    def model_json_schema(cls, **kwargs) -> dict[str, Any]: ...
         | 
| 35 |  | 
| 36 | 
             
                    page_content: str | None
         | 
| 37 | 
             
                    input_mode: str
         | 
| 38 |  | 
| 39 | 
             
                class InputParams(ParamsModel):
         | 
| 40 | 
             
                    @classmethod
         | 
| 41 | 
            +
                    def model_json_schema(cls, **kwargs) -> dict[str, Any]: ...
         | 
| 42 |  | 
| 43 | 
             
                def predict(self, params: ParamsModel) -> Image.Image | None: ...
         | 
| 44 |  | 
|  | |
| 305 | 
             
                    # route to setup frontend
         | 
| 306 | 
             
                    @self.app.get("/api/settings")
         | 
| 307 | 
             
                    async def settings() -> JSONResponse:
         | 
| 308 | 
            +
                        info_schema = self.pipeline.Info.model_json_schema()
         | 
| 309 | 
             
                        info = self.pipeline.Info()
         | 
| 310 | 
             
                        page_content = ""
         | 
| 311 | 
             
                        if hasattr(info, "page_content") and info.page_content:
         | 
| 312 | 
             
                            page_content = markdown2.markdown(info.page_content)
         | 
| 313 |  | 
| 314 | 
            +
                        input_params = self.pipeline.InputParams.model_json_schema()
         | 
| 315 | 
             
                        return JSONResponse(
         | 
| 316 | 
             
                            {
         | 
| 317 | 
             
                                "info": info_schema,
         | 
