DiGuaQiu commited on
Commit
e1e89c3
·
verified ·
1 Parent(s): 9c79051

Add Zero GPU Decoraters

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -1,3 +1,5 @@
 
 
1
  import tempfile
2
  from pathlib import Path
3
 
@@ -66,6 +68,7 @@ def save_file(segmentation, path):
66
  return path
67
 
68
 
 
69
  def infer(image_path):
70
  with tempfile.TemporaryDirectory() as tmpdirname:
71
 
 
1
+ import spaces
2
+
3
  import tempfile
4
  from pathlib import Path
5
 
 
68
  return path
69
 
70
 
71
+ @spaces.GPU(duration=150)
72
  def infer(image_path):
73
  with tempfile.TemporaryDirectory() as tmpdirname:
74