File size: 924 Bytes
1963f53
 
 
 
 
 
a26c57b
1963f53
 
 
 
 
 
 
 
6b181f4
 
 
 
 
 
 
 
 
 
 
 
1963f53
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""
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()