Spaces:
Runtime error
Runtime error
Commit
Β·
a65b44b
1
Parent(s):
473c949
add spaces
Browse files
app.py
CHANGED
|
@@ -20,6 +20,6 @@ def check_port_and_kill():
|
|
| 20 |
subprocess.check_call(command, shell=True)
|
| 21 |
|
| 22 |
if __name__ == "__main__":
|
| 23 |
-
check_and_install_pixi()
|
| 24 |
check_port_and_kill()
|
| 25 |
-
|
|
|
|
|
|
| 20 |
subprocess.check_call(command, shell=True)
|
| 21 |
|
| 22 |
if __name__ == "__main__":
|
|
|
|
| 23 |
check_port_and_kill()
|
| 24 |
+
check_and_install_pixi()
|
| 25 |
+
pixi_run()
|
pixi.lock
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
pixi.toml
CHANGED
|
@@ -25,4 +25,5 @@ gradio = ">=4.29.0,<4.30"
|
|
| 25 |
rerun-sdk = ">=0.15.1,<0.16"
|
| 26 |
|
| 27 |
[pypi-dependencies]
|
| 28 |
-
mini-dust3r = "*"
|
|
|
|
|
|
| 25 |
rerun-sdk = ">=0.15.1,<0.16"
|
| 26 |
|
| 27 |
[pypi-dependencies]
|
| 28 |
+
mini-dust3r = "*"
|
| 29 |
+
spaces = "==0.28.3"
|
pixi_app.py
CHANGED
|
@@ -1,6 +1,14 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
def greet(name):
|
| 3 |
-
|
|
|
|
| 4 |
|
| 5 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 6 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import spaces
|
| 3 |
+
import torch
|
| 4 |
+
|
| 5 |
+
tensor = torch.zeros(3).cuda()
|
| 6 |
+
print(tensor.device)
|
| 7 |
+
|
| 8 |
+
@spaces.GPU
|
| 9 |
def greet(name):
|
| 10 |
+
print(tensor.device)
|
| 11 |
+
return "Hello pixi pablo " + name + "!!"
|
| 12 |
|
| 13 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 14 |
demo.launch()
|