harshildarji
commited on
Commit
•
99e8b58
1
Parent(s):
d6e906e
update app
Browse files
app.py
CHANGED
@@ -3,7 +3,12 @@ import warnings
|
|
3 |
import matplotlib.colors as mcolors
|
4 |
import matplotlib.pyplot as plt
|
5 |
import streamlit as st
|
6 |
-
from transformers import
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
warnings.simplefilter(action="ignore", category=Warning)
|
9 |
logging.set_verbosity(logging.ERROR)
|
@@ -70,6 +75,12 @@ st.markdown(
|
|
70 |
label {
|
71 |
font-weight: 500;
|
72 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
</style>
|
74 |
""",
|
75 |
unsafe_allow_html=True,
|
@@ -232,6 +243,6 @@ if st.button("Analyze"):
|
|
232 |
unsafe_allow_html=True,
|
233 |
)
|
234 |
st.markdown(
|
235 |
-
"
|
236 |
unsafe_allow_html=True,
|
237 |
-
)
|
|
|
3 |
import matplotlib.colors as mcolors
|
4 |
import matplotlib.pyplot as plt
|
5 |
import streamlit as st
|
6 |
+
from transformers import (
|
7 |
+
AutoModelForTokenClassification,
|
8 |
+
AutoTokenizer,
|
9 |
+
logging,
|
10 |
+
pipeline,
|
11 |
+
)
|
12 |
|
13 |
warnings.simplefilter(action="ignore", category=Warning)
|
14 |
logging.set_verbosity(logging.ERROR)
|
|
|
75 |
label {
|
76 |
font-weight: 500;
|
77 |
}
|
78 |
+
.tip {
|
79 |
+
background-color: rgba(220, 219, 219, 0.25);
|
80 |
+
padding: 5px;
|
81 |
+
border-radius: 7px;
|
82 |
+
display: inline-block;
|
83 |
+
}
|
84 |
</style>
|
85 |
""",
|
86 |
unsafe_allow_html=True,
|
|
|
243 |
unsafe_allow_html=True,
|
244 |
)
|
245 |
st.markdown(
|
246 |
+
'<div class="tip"><strong>Tip:</strong> Hover over the colored words to see its class.</div>',
|
247 |
unsafe_allow_html=True,
|
248 |
+
)
|