Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -146,7 +146,7 @@ def main():
|
|
| 146 |
|
| 147 |
model_path1 = "DistilBertforTokenclassification"
|
| 148 |
|
| 149 |
-
model = DistilBertForTokenClassification.from_pretrained(model_path1
|
| 150 |
pipe = pipeline('ner', model=model, tokenizer=tokenizer,aggregation_strategy='simple') #grouped_entities=True
|
| 151 |
st.write('DistilBERT loaded')
|
| 152 |
sentence_pred = []
|
|
|
|
| 146 |
|
| 147 |
model_path1 = "DistilBertforTokenclassification"
|
| 148 |
|
| 149 |
+
model = DistilBertForTokenClassification.from_pretrained(model_path1,low_cpu_mem_usage=True) #len(unique_tags),, num_labels= 7, , id2label={0:'CT',1:'E',2:'C',3:'O'}
|
| 150 |
pipe = pipeline('ner', model=model, tokenizer=tokenizer,aggregation_strategy='simple') #grouped_entities=True
|
| 151 |
st.write('DistilBERT loaded')
|
| 152 |
sentence_pred = []
|