initial commit
Browse files- app.py +12 -0
- 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
|