Lam-Hung commited on
Commit
367aec6
1 Parent(s): 261e1f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,4 +1,4 @@
1
- import spaces
2
  import torch
3
  import numpy as np
4
  from transformers import AutoImageProcessor, AutoModelForDepthEstimation
@@ -88,7 +88,7 @@ def ade_palette() -> list[list[int]]:
88
 
89
 
90
  @torch.inference_mode
91
- @space.GPU
92
  def get_depth_image(image: Image) -> Image:
93
 
94
  """
@@ -116,7 +116,7 @@ def get_depth_image(image: Image) -> Image:
116
  return image
117
 
118
  @torch.inference_mode
119
- @space.GPU
120
  def get_segmentation_of_room(image: Image):
121
  #-> tuple[np.ndarray, Image]:
122
 
@@ -145,7 +145,7 @@ def get_segmentation_of_room(image: Image):
145
  return seg_image
146
 
147
  @torch.inference_mode
148
- @space.GPU
149
  def interior_inference(image,
150
  prompt,
151
  negative_prompt="window, door, low resolution, banner, logo, watermark, text, deformed, blurry, out of focus, surreal, ugly, beginner",
 
1
+ import spacess
2
  import torch
3
  import numpy as np
4
  from transformers import AutoImageProcessor, AutoModelForDepthEstimation
 
88
 
89
 
90
  @torch.inference_mode
91
+ @spaces.GPU
92
  def get_depth_image(image: Image) -> Image:
93
 
94
  """
 
116
  return image
117
 
118
  @torch.inference_mode
119
+ @spaces.GPU
120
  def get_segmentation_of_room(image: Image):
121
  #-> tuple[np.ndarray, Image]:
122
 
 
145
  return seg_image
146
 
147
  @torch.inference_mode
148
+ @spaces.GPU
149
  def interior_inference(image,
150
  prompt,
151
  negative_prompt="window, door, low resolution, banner, logo, watermark, text, deformed, blurry, out of focus, surreal, ugly, beginner",