wannaphong
commited on
Commit
•
5cb5b27
1
Parent(s):
454eaa3
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ def corefer(text):
|
|
20 |
for s,e in tag:
|
21 |
dic_ents["ents"].append({"start": s, "end": e, "label": _tag[i]})
|
22 |
colors={i:"#"+''.join([random.choice('0123456789ABCDEF') for j in range(6)]) for i in _tag} # thank https://stackoverflow.com/a/50218895
|
23 |
-
return displacy.render(dic_ents, manual=True, style="ent",options=colors)
|
24 |
|
25 |
|
26 |
iface = gr.Interface(fn=corefer,
|
|
|
20 |
for s,e in tag:
|
21 |
dic_ents["ents"].append({"start": s, "end": e, "label": _tag[i]})
|
22 |
colors={i:"#"+''.join([random.choice('0123456789ABCDEF') for j in range(6)]) for i in _tag} # thank https://stackoverflow.com/a/50218895
|
23 |
+
return displacy.render(dic_ents, manual=True, style="ent",options=colors, page=True)
|
24 |
|
25 |
|
26 |
iface = gr.Interface(fn=corefer,
|