Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
Duplicated from
hysts/Shap-E
fffiloni
/
Image-Caption-2-Shap-E
like
45
Paused
App
Files
Files
Community
3
a3b9053
Image-Caption-2-Shap-E
/
utils.py
fffiloni
Duplicate from hysts/Shap-E
3c812ea
over 1 year ago
raw
Copy download link
history
blame
Safe
192 Bytes
import
random
from
settings
import
MAX_SEED
def
randomize_seed_fn
(
seed:
int
, randomize_seed:
bool
) ->
int
:
if
randomize_seed:
seed = random.randint(
0
, MAX_SEED)
return
seed