not-lain commited on
Commit
003d203
·
1 Parent(s): 619d59f

initial commit

Browse files
Files changed (2) hide show
  1. app.py +12 -0
  2. requirements +2 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import spaces
3
+ import torch
4
+
5
+ zero = torch.Tensor([0]).cuda()
6
+
7
+ @spaces.GPU
8
+ def greet(n):
9
+ return f"Hello {zero + n} Tensor"
10
+
11
+ demo = gr.Interface(fn=greet, inputs=gr.Number(), outputs=gr.Text())
12
+ demo.launch()
requirements ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ spaces
2
+ torch