Update app.py
Browse files
app.py
CHANGED
@@ -373,60 +373,6 @@ def update_inputs(is_open, index, state: list):
|
|
373 |
print(indexs)
|
374 |
return indexs, is_open
|
375 |
|
376 |
-
from huggingface_hub import snapshot_download
|
377 |
-
|
378 |
-
# FLUX.1-dev
|
379 |
-
snapshot_download(
|
380 |
-
repo_id="black-forest-labs/FLUX.1-dev",
|
381 |
-
local_dir="./FLUX.1-dev",
|
382 |
-
local_dir_use_symlinks=False
|
383 |
-
)
|
384 |
-
|
385 |
-
# Florence-2-large
|
386 |
-
snapshot_download(
|
387 |
-
repo_id="microsoft/Florence-2-large",
|
388 |
-
local_dir="./Florence-2-large",
|
389 |
-
local_dir_use_symlinks=False
|
390 |
-
)
|
391 |
-
|
392 |
-
# CLIP ViT Large
|
393 |
-
snapshot_download(
|
394 |
-
repo_id="openai/clip-vit-large-patch14",
|
395 |
-
local_dir="./clip-vit-large-patch14",
|
396 |
-
local_dir_use_symlinks=False
|
397 |
-
)
|
398 |
-
|
399 |
-
# DINO ViT-s16
|
400 |
-
snapshot_download(
|
401 |
-
repo_id="facebook/dino-vits16",
|
402 |
-
local_dir="./dino-vits16",
|
403 |
-
local_dir_use_symlinks=False
|
404 |
-
)
|
405 |
-
|
406 |
-
# mPLUG Visual Question Answering
|
407 |
-
snapshot_download(
|
408 |
-
repo_id="xingjianleng/mplug_visual-question-answering_coco_large_en",
|
409 |
-
local_dir="./mplug_visual-question-answering_coco_large_en",
|
410 |
-
local_dir_use_symlinks=False
|
411 |
-
)
|
412 |
-
|
413 |
-
# XVerse
|
414 |
-
snapshot_download(
|
415 |
-
repo_id="ByteDance/XVerse",
|
416 |
-
local_dir="./XVerse",
|
417 |
-
local_dir_use_symlinks=False
|
418 |
-
)
|
419 |
-
|
420 |
-
|
421 |
-
os.environ["FLORENCE2_MODEL_PATH"] = "./checkpoints/Florence-2-large"
|
422 |
-
os.environ["SAM2_MODEL_PATH"] = "./checkpoints/sam2.1_hiera_large.pt"
|
423 |
-
os.environ["FACE_ID_MODEL_PATH"] = "./checkpoints/model_ir_se50.pth"
|
424 |
-
os.environ["CLIP_MODEL_PATH"] = "./checkpoints/clip-vit-large-patch14"
|
425 |
-
os.environ["FLUX_MODEL_PATH"] = "./checkpoints/FLUX.1-dev"
|
426 |
-
os.environ["DPG_VQA_MODEL_PATH"] = "./checkpoints/mplug_visual-question-answering_coco_large_en"
|
427 |
-
os.environ["DINO_MODEL_PATH"] = "./checkpoints/dino-vits16"
|
428 |
-
|
429 |
-
|
430 |
with gr.Blocks() as demo:
|
431 |
|
432 |
indexs_state = gr.State([0, 1]) # 添加状态来存储 indexs
|
|
|
373 |
print(indexs)
|
374 |
return indexs, is_open
|
375 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
with gr.Blocks() as demo:
|
377 |
|
378 |
indexs_state = gr.State([0, 1]) # 添加状态来存储 indexs
|