multimodalart HF Staff commited on
Commit
3e1e327
·
verified ·
1 Parent(s): 85300f6

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -37,16 +37,13 @@ MAX_SIDE = 512 # keep encode time and sequence length comfortable on ZeroGPU
37
  # Model loading (module scope, eager .to("cuda") — intercepted by the spaces hijack)
38
  # ---------------------------------------------------------------------------
39
 
40
- ckpt_dir = CHECKPOINT # from_pretrained accepts repo ids directly
41
- config = json.loads(Path(hf_hub_file(ckpt_dir, "config.json")).read_text()) if False else None
42
-
43
-
44
  def hf_hub_file(repo_id, filename):
45
  from huggingface_hub import hf_hub_download
46
  return hf_hub_download(repo_id, filename)
47
 
48
 
49
- config = json.loads(hf_hub_file(ckpt_dir, "config.json").read_text())
 
50
  config.update(
51
  preserve_option_order=True,
52
  max_image_tokens=1024,
 
37
  # Model loading (module scope, eager .to("cuda") — intercepted by the spaces hijack)
38
  # ---------------------------------------------------------------------------
39
 
 
 
 
 
40
  def hf_hub_file(repo_id, filename):
41
  from huggingface_hub import hf_hub_download
42
  return hf_hub_download(repo_id, filename)
43
 
44
 
45
+ ckpt_dir = CHECKPOINT # from_pretrained accepts repo ids directly
46
+ config = json.loads(Path(hf_hub_file(ckpt_dir, "config.json")).read_text())
47
  config.update(
48
  preserve_option_order=True,
49
  max_image_tokens=1024,