Seetha commited on
Commit
138e3ff
1 Parent(s): 0bd7137

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -110,7 +110,7 @@ def main():
110
 
111
  tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased") #bert-base-uncased
112
 
113
- model_path = "checkpoint2850"
114
 
115
  model = AutoModelForSequenceClassification.from_pretrained(model_path,id2label={0:'non-causal',1:'causal'})
116
 
@@ -126,7 +126,7 @@ def main():
126
 
127
 
128
 
129
- model_path1 = "DistilBertForTokeClassification"
130
 
131
  model = DistilBertForTokenClassification.from_pretrained(model_path1) #len(unique_tags),, num_labels= 7, , id2label={0:'CT',1:'E',2:'C',3:'O'}
132
  pipe = pipeline('ner', model=model, tokenizer=tokenizer,aggregation_strategy='simple') #grouped_entities=True
 
110
 
111
  tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased") #bert-base-uncased
112
 
113
+ model_path = "checkpoint-2850"
114
 
115
  model = AutoModelForSequenceClassification.from_pretrained(model_path,id2label={0:'non-causal',1:'causal'})
116
 
 
126
 
127
 
128
 
129
+ model_path1 = "DistilBertforTokenclassification"
130
 
131
  model = DistilBertForTokenClassification.from_pretrained(model_path1) #len(unique_tags),, num_labels= 7, , id2label={0:'CT',1:'E',2:'C',3:'O'}
132
  pipe = pipeline('ner', model=model, tokenizer=tokenizer,aggregation_strategy='simple') #grouped_entities=True