Spaces:
Runtime error
Runtime error
Atharva
commited on
Commit
•
732bfc1
1
Parent(s):
af016c6
style update
Browse files
app.py
CHANGED
@@ -67,22 +67,9 @@ def get_candidates(mentions_tags):
|
|
67 |
def display_tag(text, typ, label):
|
68 |
if label != 'NIL':
|
69 |
label = "https://en.wikipedia.org/wiki/" + label
|
70 |
-
return f
|
71 |
-
text-decoration:none; background-color:{COLOR[typ]}; color: white; cursor:pointer;
|
72 |
-
white-space: nowrap; font-weight:400"
|
73 |
-
href={label} target="_blank">
|
74 |
-
<span style="margin-right:2px;">{text}</span>
|
75 |
-
<span style="background-color: white; color: {COLOR[typ]}; padding: 1px 2px;
|
76 |
-
border-radius: 4px; font-size: 0.8em">{typ}</span>
|
77 |
-
</a>"""
|
78 |
else:
|
79 |
-
return f
|
80 |
-
text-decoration:none; background-color: #EF4444; color: white; cursor:not-allowed;
|
81 |
-
white-space: nowrap;">
|
82 |
-
<span style="margin-right:2px">{text}</span>
|
83 |
-
<span style="background-color: white; color: #EF4444; padding: 1px 2px;
|
84 |
-
border-radius: 4px; font-size: 0.8em">{typ}</span>
|
85 |
-
</span>"""
|
86 |
|
87 |
|
88 |
|
|
|
67 |
def display_tag(text, typ, label):
|
68 |
if label != 'NIL':
|
69 |
label = "https://en.wikipedia.org/wiki/" + label
|
70 |
+
return f'<a style="margin: 0px 5px 0px 0px; padding: 1px 0px 2px 4px; border-radius: 4px; text-decoration:none; background-color:{COLOR[typ]}; color: white; cursor:pointer; white-space: nowrap; font-weight:400" href={label} target="_blank"><span style="margin-right:2px;">{text}</span><span style="background-color: white; color: {COLOR[typ]}; padding: 1px 2px; border-radius: 4px; font-size: 0.8em">{typ}</span></a>'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
else:
|
72 |
+
return f'<span style="margin: 0px 5px 0px 0px; padding: 1px 0px 2px 4px; border-radius: 4px; text-decoration:none; background-color: #EF4444; color: white; cursor:not-allowed; white-space: nowrap;"><span style="margin-right:2px">{text}</span><span style="background-color: white; color: #EF4444; padding: 1px 2px; border-radius: 4px; font-size: 0.8em">{typ}</span></span>'
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
|
75 |
|