with gr.Box(visible=os.environ.get("SPACE_ID")): is_shared_ui = str(os.environ.get("IS_SHARED_UI", "") or "").strip().lower() not in ("", "0", "false", "none", "no") if is_shared_ui: import torch if not torch.cuda.is_available(): gr.HTML(f"""
""") else: gr.HTML(f""" """) elif os.environ.get("SPACE_ID"): import torch if not torch.cuda.is_available(): gr.HTML(f""" """) else: gr.HTML(f""" """)