From a25a27a18e070a6176007ca749fb3942dff9182b Mon Sep 17 00:00:00 2001 From: caixiaoshun <3038523973@qq.com> Date: Fri, 22 Nov 2024 13:39:37 +0800 Subject: [PATCH] =?UTF-8?q?refactor(hugging=5Fface):=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=86=97=E4=BD=99=E6=96=87=E4=BB=B6=E5=92=8C=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 README.md 文件,其中包含已过时或不再需要的信息 - 删除 app.py 中的 name_mapping 字典,简化代码结构 - 移除 requirements.txt 文件,可能由于依赖已内置或不再使用 --- hugging_face/README.md | 13 ------------- hugging_face/app.py | 11 ----------- hugging_face/requirements.txt | 24 ------------------------ 3 files changed, 48 deletions(-) delete mode 100644 hugging_face/README.md delete mode 100644 hugging_face/requirements.txt diff --git a/hugging_face/README.md b/hugging_face/README.md deleted file mode 100644 index b059204..0000000 --- a/hugging_face/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Cloud Adapter -emoji: 🏢 -colorFrom: red -colorTo: purple -sdk: gradio -sdk_version: 5.6.0 -app_file: app.py -pinned: false -license: apache-2.0 ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/hugging_face/app.py b/hugging_face/app.py index e6c748e..3523170 100644 --- a/hugging_face/app.py +++ b/hugging_face/app.py @@ -22,17 +22,6 @@ def __init__(self, config_path=None, checkpoint_path=None, device="cpu", example self.img_size = 256 if num_classes == 2 else 512 self.palette = palette self.legend = self.html_legend(num_classes=num_classes) - self.name_mapping = { - "KappaMask": "kappamask", - "CDNetv1": "cdnetv1", - "CDNetv2": "cdnetv2", - "HRCloudNet": "hrcloudnet", - "MCDNet": "mcdnet", - "SCNN": "scnn", - "DBNet": "dbnet", - "UNetMobv2": "unetmobv2", - "Cloud-Adapter": "cloud-adapter", - } self.create_ui() diff --git a/hugging_face/requirements.txt b/hugging_face/requirements.txt deleted file mode 100644 index 477b3a5..0000000 --- a/hugging_face/requirements.txt +++ /dev/null @@ -1,24 +0,0 @@ -einops==0.8.0 -segmentation_models_pytorch -gradio==4.44.1 -huggingface-hub==0.26.0 -image_dehazer==0.0.9 - -mmcv==2.1.0 --f https://download.openmmlab.com/mmcv/dist/cpu/torch2.0/index.html - -mmdet==3.3.0 -mmengine==0.10.5 -mmpretrain==1.2.0 -mmsegmentation==1.2.2 -timm==0.9.2 - - -torch==2.0.1 --f https://download.pytorch.org/whl/cpu -torchvision==0.15.2 -torchaudio==2.0.2 -ftfy -regex -yacs -numpy==1.24.2