code: def _main():
      setup_paths()
      os.environ["h2ogpt_block_gradio_exit"] = "False"
      os.environ["h2ogpt_score_model"] = ""
  
      try:
          from pynvml import nvmlInit, nvmlDeviceGetCount
  
          nvmlInit()
          deviceCount = nvmlDeviceGetCount()
      except Exception as e:
          print("No GPUs detected by NVML: %s" % str(e))
          deviceCount = 0
  
      need_get_gpu_torch = False
      if have_torch and deviceCount > 0:
          if "+cu" not in torch_version:
              need_get_gpu_torch = True
      elif not have_torch and deviceCount > 0:
          need_get_gpu_torch = True
  
      print(
          "Torch Status: have torch: %s need get gpu torch: %s CVD: %s GPUs: %s"
          % (
              have_torch,
              need_get_gpu_torch,
              os.getenv("CUDA_VISIBLE_DEVICES"),
              deviceCount,
          )
      )
  
      auto_install_torch_gpu = False
  
      import sys
  
      if (
          auto_install_torch_gpu
          and (not have_torch or need_get_gpu_torch)
          and sys.platform == "win32"
      ):
          print("Installing Torch")
          # for one-click, don't have torch installed, install now
          import subprocess
          import sys
  
          def install(package):
              subprocess.check_call(
                  [sys.executable, "-m", "pip", "install", package]
              )
  
          if os.getenv("TORCH_WHEEL"):
              print(
                  "Installing Torch from %s" % os.getenv("TORCH_WHEEL")
              )
              install(os.getenv("TORCH_WHEEL"))
          else:
              if need_get_gpu_torch:
                  wheel_file = "https://h2o-release.s3.amazonaws.com/h2ogpt/torch-2.1.2%2Bcu118-cp310-cp310-win_amd64.whl"
                  print("Installing Torch from %s" % wheel_file)
                  install(wheel_file)
              # assume cpu torch part of install
              # else:
              #   wheel_file = "https://h2o-release.s3.amazonaws.com/h2ogpt/torch-2.1.2-cp310-cp310-win_amd64.whl"
              #    print("Installing Torch from %s" % wheel_file)
              #    install(wheel_file)
          import importlib
  
          importlib.invalidate_caches()
          import pkg_resources
  
          importlib.reload(
              pkg_resources
          )  # re-load because otherwise cache would be bad
  
      from generate import entrypoint_main as main_h2ogpt
  
      main_h2ogpt()
  
      server_name = os.getenv(
          "h2ogpt_server_name",
          os.getenv("H2OGPT_SERVER_NAME", "localhost"),
      )
      server_port = os.getenv("GRADIO_SERVER_PORT", str(7860))
  
      url = "http://%s:%s" % (server_name, server_port)
      webbrowser.open(url)
  
      while True:
          time.sleep(10000)
  
file_path: h2ogpt/win_run_app.py
imports: import os
  import sys
  import time
  import traceback
  import webbrowser
  import shutil, errno
  from importlib.metadata import distribution, PackageNotFoundError
label_desc: Use image node_id 3 for calling a global function with example usage: _main() without return types