Upload 3 files
Browse files
.gitattributes
CHANGED
@@ -112,3 +112,4 @@ Danbooru[[:space:]]Prompt[[:space:]]Selector/TEST2024/NAIA_0102_testv2.exe filte
|
|
112 |
Danbooru[[:space:]]Prompt[[:space:]]Selector/TEST2024/NAIA_0103_testv2.exe filter=lfs diff=lfs merge=lfs -text
|
113 |
Danbooru[[:space:]]Prompt[[:space:]]Selector/TEST2024/NAIA_0105_testv2.exe filter=lfs diff=lfs merge=lfs -text
|
114 |
Danbooru[[:space:]]Prompt[[:space:]]Selector/TEST2024/NAIA_0107_testv3.exe filter=lfs diff=lfs merge=lfs -text
|
|
|
|
112 |
Danbooru[[:space:]]Prompt[[:space:]]Selector/TEST2024/NAIA_0103_testv2.exe filter=lfs diff=lfs merge=lfs -text
|
113 |
Danbooru[[:space:]]Prompt[[:space:]]Selector/TEST2024/NAIA_0105_testv2.exe filter=lfs diff=lfs merge=lfs -text
|
114 |
Danbooru[[:space:]]Prompt[[:space:]]Selector/TEST2024/NAIA_0107_testv3.exe filter=lfs diff=lfs merge=lfs -text
|
115 |
+
Danbooru[[:space:]]Prompt[[:space:]]Selector/TEST2024/NAIA_0108_testv3.exe filter=lfs diff=lfs merge=lfs -text
|
Danbooru Prompt Selector/TEST2024/NAIA_0108_testv3.exe
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:07fc66ac08ff36bda1bf9755af210e91454c219f8819ce5192c504e4b643bdf2
|
3 |
+
size 837990050
|
Danbooru Prompt Selector/TEST2024/NAIA_0108_testv3.py
ADDED
The diff for this file is too large to render.
See raw diff
|
|
Danbooru Prompt Selector/TEST2024/NAIA_search.py
CHANGED
@@ -147,6 +147,7 @@ def search(df, search_request, exclude_request, E=None, N=None, S=None, G=None):
|
|
147 |
return None
|
148 |
|
149 |
#OR 처리
|
|
|
150 |
if curly_brace_group:
|
151 |
for keyword in curly_brace_group:
|
152 |
or_search_keyword = [item.strip() for item in keyword[1:-1].split('|')]
|
@@ -155,6 +156,7 @@ def search(df, search_request, exclude_request, E=None, N=None, S=None, G=None):
|
|
155 |
keywords = [item.strip() for item in keyword.split(',')]
|
156 |
matched_rows = None
|
157 |
for keyword in keywords:
|
|
|
158 |
for column in ['copyright', 'character', 'artist', 'meta', 'general']:
|
159 |
request_regex = False
|
160 |
if any(char in keyword for char in special_chars):
|
@@ -171,19 +173,20 @@ def search(df, search_request, exclude_request, E=None, N=None, S=None, G=None):
|
|
171 |
ndf = matched_rows[matched_rows[column].str.contains(keyword, na=False)]
|
172 |
print(keyword, len(matched_rows), len(ndf))
|
173 |
if not ndf.empty:
|
174 |
-
|
175 |
-
|
176 |
-
break
|
177 |
-
else:
|
178 |
-
if not matched_rows.empty and not ndf.empty:
|
179 |
ndf = None
|
180 |
-
|
181 |
-
|
|
|
|
|
|
|
|
|
182 |
if not matched_rows.empty:
|
183 |
results = pd.concat([results, matched_rows])
|
184 |
print(results)
|
185 |
del[[df]]
|
186 |
-
results = results.drop_duplicates()
|
187 |
df = results.copy()
|
188 |
del[[results]]
|
189 |
if(len(df) == 0):
|
|
|
147 |
return None
|
148 |
|
149 |
#OR 처리
|
150 |
+
ndf = None
|
151 |
if curly_brace_group:
|
152 |
for keyword in curly_brace_group:
|
153 |
or_search_keyword = [item.strip() for item in keyword[1:-1].split('|')]
|
|
|
156 |
keywords = [item.strip() for item in keyword.split(',')]
|
157 |
matched_rows = None
|
158 |
for keyword in keywords:
|
159 |
+
ndfs = []
|
160 |
for column in ['copyright', 'character', 'artist', 'meta', 'general']:
|
161 |
request_regex = False
|
162 |
if any(char in keyword for char in special_chars):
|
|
|
173 |
ndf = matched_rows[matched_rows[column].str.contains(keyword, na=False)]
|
174 |
print(keyword, len(matched_rows), len(ndf))
|
175 |
if not ndf.empty:
|
176 |
+
ndfs.append(ndf.copy())
|
177 |
+
del(ndf)
|
|
|
|
|
|
|
178 |
ndf = None
|
179 |
+
if ndfs:
|
180 |
+
matched_rows = pd.concat(ndfs, ignore_index=True)
|
181 |
+
matched_rows = matched_rows.drop_duplicates(subset=['general'])
|
182 |
+
ndfs.clear()
|
183 |
+
else:
|
184 |
+
matched_rows.drop_duplicates(subset=['general'])
|
185 |
if not matched_rows.empty:
|
186 |
results = pd.concat([results, matched_rows])
|
187 |
print(results)
|
188 |
del[[df]]
|
189 |
+
results = results.drop_duplicates(subset=['general'])
|
190 |
df = results.copy()
|
191 |
del[[results]]
|
192 |
if(len(df) == 0):
|