atanu0491 commited on
Commit
71f87e2
·
1 Parent(s): 701b086

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -40,11 +40,15 @@ if choice == 'Text Input':
40
  sentence = Sentence(data)
41
  model = load_model('best-model-002.pt')
42
  model.predict(sentence)
 
43
  # st.write(sentence.to_original_text())
44
  # st.write(sentence.to_tagged_string())
45
  for token in sentence:
46
- st.write(token.text)
47
- st.write(token.tag)
 
 
 
48
 
49
 
50
 
 
40
  sentence = Sentence(data)
41
  model = load_model('best-model-002.pt')
42
  model.predict(sentence)
43
+ my_list = []
44
  # st.write(sentence.to_original_text())
45
  # st.write(sentence.to_tagged_string())
46
  for token in sentence:
47
+ word = []
48
+ word.append(token.text)
49
+ word.append(token.tag)
50
+ my_list.append(tuple(word))
51
+ annotated_text(my_list)
52
 
53
 
54