Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse filesadded missing function for set
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,
|