cronos3k commited on
Commit
16dfcc8
·
verified ·
1 Parent(s): 258ea5a

Update app.py

Browse files

added missing function for set

Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -36,6 +36,10 @@ def preprocess_image(image: Image.Image) -> Tuple[str, Image.Image]:
36
  processed_image = pipeline.preprocess_image(image)
37
  return processed_image
38
 
 
 
 
 
39
  @spaces.GPU
40
  def image_to_3d(
41
  image: Image.Image,
 
36
  processed_image = pipeline.preprocess_image(image)
37
  return processed_image
38
 
39
+ def get_seed(randomize_seed: bool, seed: int) -> int:
40
+ """Get the random seed."""
41
+ return np.random.randint(0, MAX_SEED) if randomize_seed else seed
42
+
43
  @spaces.GPU
44
  def image_to_3d(
45
  image: Image.Image,