github-actions[bot] commited on
Commit
d1b92b9
·
1 Parent(s): 5285f34

Deploy hyper3labs/HyperView from Hyper3Labs/hyperview-spaces@c59ea73

Browse files
Files changed (1) hide show
  1. demo.py +3 -0
demo.py CHANGED
@@ -22,6 +22,7 @@ HF_SPLIT = os.environ.get("DEMO_HF_SPLIT", "validation")
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
 
26
  CLIP_MODEL_ID = os.environ.get("DEMO_CLIP_MODEL", "openai/clip-vit-base-patch32")
27
  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
  image_key=HF_IMAGE_KEY,
44
  label_key=HF_LABEL_KEY,
45
  max_samples=NUM_SAMPLES,
 
 
46
  )
47
 
48
  spaces = dataset.list_spaces()
 
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")
 
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()