Update main.py
Browse files
main.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
import json
|
3 |
import torch
|
4 |
-
from transformers import AutoTokenizer
|
5 |
from modelling_cnn import CNNForNER, SentimentCNNModel
|
6 |
import pandas as pd
|
7 |
import altair as alt
|
@@ -21,7 +21,7 @@ import altair as alt
|
|
21 |
# ner_model.eval()
|
22 |
|
23 |
ner_model = AutoModelForTokenClassification.from_pretrained("masakhane/afroxlmr-large-ner-masakhaner-1.0_2.0")
|
24 |
-
|
25 |
ner_config = ner_model.config
|
26 |
|
27 |
ner_model.eval()
|
|
|
1 |
import streamlit as st
|
2 |
import json
|
3 |
import torch
|
4 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
5 |
from modelling_cnn import CNNForNER, SentimentCNNModel
|
6 |
import pandas as pd
|
7 |
import altair as alt
|
|
|
21 |
# ner_model.eval()
|
22 |
|
23 |
ner_model = AutoModelForTokenClassification.from_pretrained("masakhane/afroxlmr-large-ner-masakhaner-1.0_2.0")
|
24 |
+
ner_tokenizer = AutoTokenizer.from_pretrained("masakhane/afroxlmr-large-ner-masakhaner-1.0_2.0")
|
25 |
ner_config = ner_model.config
|
26 |
|
27 |
ner_model.eval()
|