import gradio as gr import spaces import torch import subprocess zero = torch.Tensor([0]).cuda() print(zero.device) # <-- 'cpu' 🤔 @spaces.GPU def greet(n): print(zero.device) # <-- 'cuda:0' 🤗 return f"Hello {zero + n} Tensor" def run_infrence(input_video,input_audio): audio = "sample_data/sir.mp3" video = "sample_data/spark_input.mp4" command = f'python3 inference.py --checkpoint_path checkpoints/wav2lip_gan.pth --face "{video}" --audio "{audio}"' print("running ") # Execute the command process = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True) # Get the output output, error = process.communicate() return output def run(): with gr.Blocks(css=".gradio-container {background-color: lightgray} #radio_div {background-color: #FFD8B4; font-size: 40px;}") as demo: gr.Markdown("