Upload 6 files
Browse files- README.md +1 -1
- app.py +2 -3
- requirements.txt +2 -2
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 👁
|
|
4 |
colorFrom: blue
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 5.
|
8 |
app_file: app.py
|
9 |
pinned: true
|
10 |
license: openrail
|
|
|
4 |
colorFrom: blue
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 5.20.0
|
8 |
app_file: app.py
|
9 |
pinned: true
|
10 |
license: openrail
|
app.py
CHANGED
@@ -22,7 +22,6 @@ _REPO_ID = 'deepghs/anime_sites_indices'
|
|
22 |
hf_fs = get_hf_fs()
|
23 |
hf_client = get_hf_client()
|
24 |
|
25 |
-
# _DEFAULT_MODEL_NAME = 'SwinV2_v3_iqdb_10_46796044_8GB'
|
26 |
_DEFAULT_MODEL_NAME = 'SwinV2_v3_danbooru_8005009_4GB'
|
27 |
_ALL_MODEL_NAMES = [
|
28 |
os.path.dirname(os.path.relpath(path, _REPO_ID))
|
@@ -103,13 +102,13 @@ def search(model_name: str, img_input, str_input: str, n_neighbours: int):
|
|
103 |
if str_input == "":
|
104 |
embeddings = siglip.get_siglip_image_embedding(
|
105 |
img_input,
|
106 |
-
model_name="smilingwolf/
|
107 |
fmt="embeddings",
|
108 |
)
|
109 |
else:
|
110 |
embeddings = siglip.get_siglip_text_embedding(
|
111 |
str_input,
|
112 |
-
model_name="smilingwolf/
|
113 |
fmt="embeddings",
|
114 |
)
|
115 |
|
|
|
22 |
hf_fs = get_hf_fs()
|
23 |
hf_client = get_hf_client()
|
24 |
|
|
|
25 |
_DEFAULT_MODEL_NAME = 'SwinV2_v3_danbooru_8005009_4GB'
|
26 |
_ALL_MODEL_NAMES = [
|
27 |
os.path.dirname(os.path.relpath(path, _REPO_ID))
|
|
|
102 |
if str_input == "":
|
103 |
embeddings = siglip.get_siglip_image_embedding(
|
104 |
img_input,
|
105 |
+
model_name="smilingwolf/siglip_swinv2_base_2025_02_22_18h56m54s",
|
106 |
fmt="embeddings",
|
107 |
)
|
108 |
else:
|
109 |
embeddings = siglip.get_siglip_text_embedding(
|
110 |
str_input,
|
111 |
+
model_name="smilingwolf/siglip_swinv2_base_2025_02_22_18h56m54s",
|
112 |
fmt="embeddings",
|
113 |
)
|
114 |
|
requirements.txt
CHANGED
@@ -2,6 +2,6 @@ pillow>=9.0.0
|
|
2 |
faiss-cpu
|
3 |
dghs-imgutils
|
4 |
onnxruntime
|
5 |
-
gradio==5.17.0
|
6 |
cheesechaser>=0.1.6
|
7 |
-
dghs-realutils
|
|
|
|
2 |
faiss-cpu
|
3 |
dghs-imgutils
|
4 |
onnxruntime
|
|
|
5 |
cheesechaser>=0.1.6
|
6 |
+
dghs-realutils>=0.1.0
|
7 |
+
gradio
|