xinjie.wang commited on
Commit
921d811
·
1 Parent(s): b09e6d0

Add application file

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ import gradio as gr
3
+
4
+ print("CUDA Version:", torch.version.cuda)
5
+
6
+ zero = torch.Tensor([0]).cuda()
7
+ print(zero.device)
8
+
9
+ def my_function(input_text):
10
+ return f"Received: {input_text}"
11
+
12
+ iface = gr.Interface(fn=my_function, inputs="text", outputs="text")
13
+ iface.launch()