We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a9de67d commit c59ea73Copy full SHA for c59ea73
spaces/imagenette-clip-hycoclip/demo.py
@@ -22,6 +22,7 @@
22
HF_IMAGE_KEY = os.environ.get("DEMO_HF_IMAGE_KEY", "image")
23
HF_LABEL_KEY = os.environ.get("DEMO_HF_LABEL_KEY", "label")
24
NUM_SAMPLES = int(os.environ.get("DEMO_SAMPLES", "300"))
25
+SAMPLE_SEED = int(os.environ.get("DEMO_SEED", "42"))
26
27
CLIP_MODEL_ID = os.environ.get("DEMO_CLIP_MODEL", "openai/clip-vit-base-patch32")
28
HYPER_MODEL_ID = os.environ.get("DEMO_HYPER_MODEL", "hycoclip-vit-s")
@@ -43,6 +44,8 @@ def _ensure_demo_ready(dataset: hv.Dataset) -> None:
43
44
image_key=HF_IMAGE_KEY,
45
label_key=HF_LABEL_KEY,
46
max_samples=NUM_SAMPLES,
47
+ shuffle=True,
48
+ seed=SAMPLE_SEED,
49
)
50
51
spaces = dataset.list_spaces()
0 commit comments