Spaces:
Runtime error
Runtime error
wira.indra
commited on
Commit
•
d84c978
1
Parent(s):
ca67adc
add twitter feature
Browse files
app.py
CHANGED
@@ -34,6 +34,8 @@ def sentiment_analysis(text):
|
|
34 |
|
35 |
def ner(text):
|
36 |
output = ner_pipeline(text)
|
|
|
|
|
37 |
return {"text": text, "entities": output}
|
38 |
|
39 |
def sentiment_ner(text):
|
|
|
34 |
|
35 |
def ner(text):
|
36 |
output = ner_pipeline(text)
|
37 |
+
for elm in output:
|
38 |
+
elm['entity'] = elm['entity_group']
|
39 |
return {"text": text, "entities": output}
|
40 |
|
41 |
def sentiment_ner(text):
|