Wootang01 commited on
Commit
65e4324
1 Parent(s): c522b86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -2,20 +2,25 @@ from transformers import pipeline, AutoModelForTokenClassification, AutoTokenize
2
  import sentencepiece
3
  import streamlit as st
4
  import pandas as pd
5
- import spacy
 
 
 
6
 
7
  example_list = [
8
-
 
9
  ]
10
 
11
- st.set_page_config(layout="wide")
12
 
13
  st.title("Vocabulary Categorizer")
 
14
 
15
- model_list = ['xlm-roberta-large-finetuned-conll03-english']
16
 
17
  st.sidebar.header("Vocabulary categorizer")
18
- model_checkpoint = st.sidebar.radio("xlm-roberta-large-finetuned-conll03-english")
19
 
20
  st.sidebar.write("Which model highlights the most vocabulary words? Which model highlights the most accurately?")
21
  st.sidebar.write("")
@@ -27,6 +32,7 @@ if model_checkpoint == "xlm-roberta-large-finetuned-conll03-english":
27
  aggregation = st.sidebar.radio("", ('simple', 'none'))
28
  st.sidebar.write(xlm_agg_strategy_info)
29
  st.sidebar.write("")
 
30
 
31
  st.subheader("Select Text Input Method")
32
  input_method = st.radio("", ('Select from Examples', 'Write or Paste New Text'))
 
2
  import sentencepiece
3
  import streamlit as st
4
  import pandas as pd
5
+ import spacy
6
+ from spacy import displacy
7
+ import plotly.express as px
8
+ import numpy as np
9
 
10
  example_list = [
11
+ "Mustafa Kemal Atatürk 1919 yılında Samsun'a çıktı.",
12
+ """Hello World"""
13
  ]
14
 
15
+ st.set_page_config(layout="wide", page_title="Vocabulary Categorizer")
16
 
17
  st.title("Vocabulary Categorizer")
18
+ st.write("This application identifies, highlights and categories nouns.")
19
 
20
+ model_list = ['xlm-roberta-large-finetuned-conll03-english', 'en_core_web_sm']
21
 
22
  st.sidebar.header("Vocabulary categorizer")
23
+ model_checkpoint = st.sidebar.radio("", model_list)
24
 
25
  st.sidebar.write("Which model highlights the most vocabulary words? Which model highlights the most accurately?")
26
  st.sidebar.write("")
 
32
  aggregation = st.sidebar.radio("", ('simple', 'none'))
33
  st.sidebar.write(xlm_agg_strategy_info)
34
  st.sidebar.write("")
35
+ else aggregation = 'none'
36
 
37
  st.subheader("Select Text Input Method")
38
  input_method = st.radio("", ('Select from Examples', 'Write or Paste New Text'))