Choiszt commited on
Commit
92d749e
·
verified ·
1 Parent(s): 174bd99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -16
app.py CHANGED
@@ -45,29 +45,18 @@ from egogpt.conversation import conv_templates, SeparatorStyle
45
  import subprocess
46
  subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
47
  from huggingface_hub import snapshot_download
48
-
49
- # 下载整个模型文件夹到本地 ./llava-onevision-qwen2-7b-ov
50
- # snapshot_download(
51
- # repo_id="lmms-lab/llava-onevision-qwen2-7b-ov",
52
- # local_dir="./llava-onevision-qwen2-7b-ov", # 指定本地存储目录
53
- # ignore_patterns=["*.md", "*.txt"] # 可以忽略一些不必要的文件(可选)
54
- # )
55
-
56
  from huggingface_hub import hf_hub_download
57
 
58
  # Download the model checkpoint file (large-v3.pt)
59
  ego_gpt_path = hf_hub_download(
60
- repo_id="EgoLife-v1/speech_encoder",
61
- filename="large-v3.pt",
62
- local_dir="./"
 
63
  )
64
 
65
 
66
- # pretrained = "/mnt/sfs-common/jkyang/EgoGPT/checkpoints/EgoGPT-llavaov-7b-EgoIT-109k-release"
67
- # pretrained = "/mnt/sfs-common/jkyang/EgoGPT/checkpoints/EgoGPT-llavaov-7b-EgoIT-EgoLife-Demo"
68
- # pretrained = 'EgoLife-v1/EgoGPT'
69
- pretrained = 'EgoLife-v1/EgoGPT-0.5b-Demo'
70
- # pretrained = "/mnt/sfs-common/jkyang/EgoGPT_release/checkpoints/EgoGPT-7b-Demo"
71
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
72
  device_map = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
73
 
 
45
  import subprocess
46
  subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
47
  from huggingface_hub import snapshot_download
 
 
 
 
 
 
 
 
48
  from huggingface_hub import hf_hub_download
49
 
50
  # Download the model checkpoint file (large-v3.pt)
51
  ego_gpt_path = hf_hub_download(
52
+ repo_id="lmms-lab/EgoGPT-0.5b-Demo",
53
+ filename="./speech_encoder/large-v3.pt",
54
+ local_dir="./",
55
+ repo_type="model"
56
  )
57
 
58
 
59
+ pretrained = "lmms-lab/EgoGPT-0.5b-Demo"
 
 
 
 
60
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
61
  device_map = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
62