docstr: Run method takes care of configuring and setting up a FastAPI server behind the scenes.
  
  Normally, you don't need to override this method.
docstr_tok: ["Run","method","takes","care","of","configuring","and","setting","up","a","FastAPI","server","behind","the","scenes",".","Normally",",","you","do","n't","need","to","override","this","method","."]
code: def run(self, *args: Any, **kwargs: Any) -> Any:
      """Run method takes care of configuring and setting up a FastAPI server behind the scenes.
  
      Normally, you don't need to override this method.
  
      """
      self.setup(*args, **kwargs)
  
      fastapi_app = FastAPI()
      self._attach_predict_fn(fastapi_app)
  
      self.ready = True
      logger.info(
          f"Your {self.__class__.__qualname__} has started. View it in your browser: http://{self.host}:{self.port}"
      )
      uvicorn.run(
          app=fastapi_app,
          host=self.host,
          port=self.port,
          log_level="error",
      )
  
imports: import abc
  import asyncio
  import base64
  import os
  import platform
  from typing import TYPE_CHECKING, Any, Dict, Optional
  import requests
  import uvicorn
  from fastapi import FastAPI
  from lightning_utilities.core.imports import compare_version, module_available
  from pydantic import BaseModel
  from lightning.app.core.work import LightningWork
  from lightning.app.utilities.app_helpers import Logger
  from lightning.app.utilities.imports import _is_torch_available, requires
label_desc: Use image node_id 10 for calling the PythonServer obj's underlying member method code with example usage: obj.run() without return types