Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,12 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
classifier = pipeline("token-classification", model="
|
5 |
def main():
|
6 |
st.title("Token classification")
|
7 |
|
8 |
with st.form("text_field"):
|
9 |
-
text = st.text_area('enter some text:
|
10 |
-
example: My name is JJ I live in Thailand.')
|
11 |
# clicked==True only when the button is clicked
|
12 |
clicked = st.form_submit_button("Compute")
|
13 |
if clicked:
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
classifier = pipeline("token-classification", model="tiny-bert-for-token-classification")
|
5 |
def main():
|
6 |
st.title("Token classification")
|
7 |
|
8 |
with st.form("text_field"):
|
9 |
+
text = st.text_area('enter some text:')
|
|
|
10 |
# clicked==True only when the button is clicked
|
11 |
clicked = st.form_submit_button("Compute")
|
12 |
if clicked:
|