Spaces:
Running
Running
Mike
commited on
Commit
·
1da09fe
1
Parent(s):
bb98016
fix some bugs
Browse files
app.py
CHANGED
@@ -14,17 +14,16 @@ def ner(text):
|
|
14 |
output_skills = token_skill_classifier(text)
|
15 |
for result in output_skills:
|
16 |
if result.get("entity"):
|
17 |
-
tag =
|
18 |
-
|
19 |
|
20 |
-
output_knowledge =
|
21 |
for result in output_knowledge:
|
22 |
if result.get("entity"):
|
23 |
-
tag =
|
24 |
-
|
25 |
|
26 |
output = output_skills + output_knowledge
|
27 |
-
|
28 |
return {"text": text, "entities": output}
|
29 |
|
30 |
|
|
|
14 |
output_skills = token_skill_classifier(text)
|
15 |
for result in output_skills:
|
16 |
if result.get("entity"):
|
17 |
+
tag = result["entity"]
|
18 |
+
result["entity"] = tag + "-skill"
|
19 |
|
20 |
+
output_knowledge = token_knowledge_classifier(text)
|
21 |
for result in output_knowledge:
|
22 |
if result.get("entity"):
|
23 |
+
tag = result["entity"]
|
24 |
+
result["entity"] = tag + "-knowledge"
|
25 |
|
26 |
output = output_skills + output_knowledge
|
|
|
27 |
return {"text": text, "entities": output}
|
28 |
|
29 |
|