lichih commited on
Commit
c276c2d
·
verified ·
1 Parent(s): c8023aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,7 +19,7 @@ class Classifier:
19
  "Canopied",
20
  ]
21
 
22
- @space.GPU(duration=60)
23
  def __init__(
24
  self, model_path="Litton-7type-visual-landscape-model.pth", device="cuda:0"
25
  ):
@@ -41,7 +41,7 @@ class Classifier:
41
  ]
42
  )
43
 
44
- @space.GPU(duration=60)
45
  def predict(self, image: Image.Image) -> tuple[Literal["Failed", "Success"], Any]:
46
  image = image.convert("RGB")
47
  input_tensor = self.preprocess(image).unsqueeze(0).to(self.device)
 
19
  "Canopied",
20
  ]
21
 
22
+ @spaces.GPU(duration=60)
23
  def __init__(
24
  self, model_path="Litton-7type-visual-landscape-model.pth", device="cuda:0"
25
  ):
 
41
  ]
42
  )
43
 
44
+ @spaces.GPU(duration=60)
45
  def predict(self, image: Image.Image) -> tuple[Literal["Failed", "Success"], Any]:
46
  image = image.convert("RGB")
47
  input_tensor = self.preprocess(image).unsqueeze(0).to(self.device)