Spaces:
Running
Running
Commit
·
3d89a99
1
Parent(s):
1afbbb9
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,7 +26,7 @@ def load_model(version,text):
|
|
| 26 |
return result
|
| 27 |
|
| 28 |
def getcolor(texts, labels):
|
| 29 |
-
colors = {'LOC': '#
|
| 30 |
return [(t,l,colors[l]) for t, l in zip(texts, labels)]
|
| 31 |
|
| 32 |
def color_annotation(to_print,transcript) :
|
|
@@ -78,7 +78,7 @@ if option == "Exemple":
|
|
| 78 |
list_to_display.append(eval(display.split('","')[i]))
|
| 79 |
else :
|
| 80 |
list_to_display.append(display.split('","')[i])
|
| 81 |
-
|
| 82 |
st.write("\n")
|
| 83 |
with st.expander("Afficher le score pour chacune des entitées trouvées :"):
|
| 84 |
for i in range(len(to_print)) :
|
|
@@ -97,7 +97,7 @@ else:
|
|
| 97 |
list_to_display.append(eval(display.split('","')[i]))
|
| 98 |
else :
|
| 99 |
list_to_display.append(display.split('","')[i])
|
| 100 |
-
|
| 101 |
st.write("\n")
|
| 102 |
with st.expander("Afficher le score pour chacune des entitées trouvées :"):
|
| 103 |
for i in range(len(to_print)) :
|
|
|
|
| 26 |
return result
|
| 27 |
|
| 28 |
def getcolor(texts, labels):
|
| 29 |
+
colors = {'LOC': '#38419D', 'PER': '#BF3131', 'ORG': '#597E52'}
|
| 30 |
return [(t,l,colors[l]) for t, l in zip(texts, labels)]
|
| 31 |
|
| 32 |
def color_annotation(to_print,transcript) :
|
|
|
|
| 78 |
list_to_display.append(eval(display.split('","')[i]))
|
| 79 |
else :
|
| 80 |
list_to_display.append(display.split('","')[i])
|
| 81 |
+
annotated_text(*list_to_display)
|
| 82 |
st.write("\n")
|
| 83 |
with st.expander("Afficher le score pour chacune des entitées trouvées :"):
|
| 84 |
for i in range(len(to_print)) :
|
|
|
|
| 97 |
list_to_display.append(eval(display.split('","')[i]))
|
| 98 |
else :
|
| 99 |
list_to_display.append(display.split('","')[i])
|
| 100 |
+
annotated_text(*list_to_display)
|
| 101 |
st.write("\n")
|
| 102 |
with st.expander("Afficher le score pour chacune des entitées trouvées :"):
|
| 103 |
for i in range(len(to_print)) :
|