Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import open3d_zerogpu_fix
|
3 |
+
import open3d as o3d
|
4 |
+
import spaces
|
5 |
+
|
6 |
+
assert o3d.core.cuda.is_available() is False
|
7 |
+
|
8 |
+
@spaces.GPU
|
9 |
+
def greet(n):
|
10 |
+
assert o3d.core.cuda.is_available() is True
|
11 |
+
return o3d.core.Tensor([], device=o3d.core.Device("CUDA:0")).device
|
12 |
+
|
13 |
+
demo = gr.Interface(fn=greet, inputs=gr.Number(), outputs=gr.Text())
|
14 |
+
demo.launch()
|