""" app to test the environment of hugging face """ import os, sys import gradio as gr import torch import pytorch3d if __name__ == '__main__': # debug print print("CUDA_HOME:", os.getenv('CUDA_HOME')) print("CUDA_PATH:", os.getenv("CUDA_PATH")) print("CUDA available?", torch.cuda.is_available()) demo = gr.Blocks(title="HDM Interaction Reconstruction Demo") # get the url to install pytorch3d import sys import torch pyt_version_str = torch.__version__.split("+")[0].replace(".", "") version_str = "".join([ f"py3{sys.version_info.minor}_cu", torch.version.cuda.replace(".", ""), f"_pyt{pyt_version_str}" ]) install = f'https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html' print("Install cmd:", install) with demo: input_rgb = gr.Image(label='Input RGB', type='numpy') demo.queue().launch()