xinjie.wang commited on
Commit
8a571e5
·
1 Parent(s): 884489b
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import os
2
  import shutil
3
-
4
  import gradio as gr
5
  from gradio_litmodel3d import LitModel3D
6
  TMP_DIR = os.path.join(
@@ -35,6 +35,10 @@ def end_session(req: gr.Request) -> None:
35
  if os.path.exists(user_dir):
36
  shutil.rmtree(user_dir)
37
 
 
 
 
 
38
 
39
  with gr.Blocks(
40
  delete_cache=(43200, 43200)
 
1
  import os
2
  import shutil
3
+ import spaces
4
  import gradio as gr
5
  from gradio_litmodel3d import LitModel3D
6
  TMP_DIR = os.path.join(
 
35
  if os.path.exists(user_dir):
36
  shutil.rmtree(user_dir)
37
 
38
+ @spaces.GPU
39
+ def greet(n):
40
+ print(zero.device) # <-- 'cuda:0' 🤗
41
+ return f"Hello {zero + n} Tensor"
42
 
43
  with gr.Blocks(
44
  delete_cache=(43200, 43200)