blisc commited on
Commit
f440cd7
·
1 Parent(s): 57f594b

add app and reqs

Browse files

Signed-off-by: Jason <jasoli@nvidia.com>

Files changed (2) hide show
  1. app.py +16 -0
  2. requirements.txt +1 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import spaces
3
+ import torch
4
+
5
+ import nemo.collections.tts.models
6
+
7
+ zero = torch.Tensor([0]).cuda()
8
+ print(zero.device) # <-- 'cpu' 🤔
9
+
10
+ @spaces.GPU
11
+ def greet(n):
12
+ print(zero.device) # <-- 'cuda:0' 🤗
13
+ return f"Hello {zero + n} Tensor"
14
+
15
+ demo = gr.Interface(fn=greet, inputs=gr.Number(), outputs=gr.Text())
16
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ nemo_toolkit[tts]@git+https://github.com/NVIDIA-NeMo/NeMo.git@9551d86f0900403de7acb110b3bfee2b9d6cabdb