Upload 2 files
Browse files- app.py +5 -4
- implications_list.json +0 -0
app.py
CHANGED
@@ -8,7 +8,7 @@ import onnxruntime as rt
|
|
8 |
import pandas as pd
|
9 |
from PIL import Image
|
10 |
|
11 |
-
TITLE = "
|
12 |
DESCRIPTION = """
|
13 |
"""
|
14 |
|
@@ -66,9 +66,6 @@ def parse_args() -> argparse.Namespace:
|
|
66 |
|
67 |
def load_labels(dataframe) -> list[str]:
|
68 |
name_series = dataframe["name"]
|
69 |
-
#name_series = name_series.map(
|
70 |
-
# lambda x: x.replace("_", " ") if x not in kaomojis else x
|
71 |
-
#)
|
72 |
tag_names = name_series.tolist()
|
73 |
|
74 |
rating_indexes = list(np.where(dataframe["category"] == 9)[0])
|
@@ -221,7 +218,11 @@ class Predictor:
|
|
221 |
key=lambda x: x[1],
|
222 |
reverse=True,
|
223 |
)
|
|
|
224 |
sorted_general_strings = [x[0] for x in sorted_general_strings]
|
|
|
|
|
|
|
225 |
sorted_general_strings = (
|
226 |
", ".join(sorted_general_strings).replace("(", "\(").replace(")", "\)")
|
227 |
)
|
|
|
8 |
import pandas as pd
|
9 |
from PIL import Image
|
10 |
|
11 |
+
TITLE = "Tagger"
|
12 |
DESCRIPTION = """
|
13 |
"""
|
14 |
|
|
|
66 |
|
67 |
def load_labels(dataframe) -> list[str]:
|
68 |
name_series = dataframe["name"]
|
|
|
|
|
|
|
69 |
tag_names = name_series.tolist()
|
70 |
|
71 |
rating_indexes = list(np.where(dataframe["category"] == 9)[0])
|
|
|
218 |
key=lambda x: x[1],
|
219 |
reverse=True,
|
220 |
)
|
221 |
+
|
222 |
sorted_general_strings = [x[0] for x in sorted_general_strings]
|
223 |
+
|
224 |
+
sorted_general_strings = [x.replace("_", " ") if x not in kaomojis else x for x in sorted_general_strings]
|
225 |
+
|
226 |
sorted_general_strings = (
|
227 |
", ".join(sorted_general_strings).replace("(", "\(").replace(")", "\)")
|
228 |
)
|
implications_list.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|