import gradio as gr import spaces import torch 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 one_shot(image_in,input_text,gender): print("Hello") return "htllo123" def run(): with gr.Blocks(css=".gradio-container {background-color: lightgray} #radio_div {background-color: #FFD8B4; font-size: 40px;}") as demo: gr.Markdown("
Feel free to give us your thoughts on this demo and please contact us at # letstalk@pragnakalp.com #
Developed by: Pragnakalp Techlabs
# """) btn.click(one_shot, inputs=[image_in,input_text,gender], outputs=[video_out]) demo.queue() demo.launch(server_name="0.0.0.0", server_port=7860) if __name__ == "__main__": run()