Jeffrey Rathgeber Jr commited on
Commit
c6e02a8
·
unverified ·
1 Parent(s): 26dac8d

testloadmodel0

Browse files
Files changed (1) hide show
  1. app.py +29 -29
app.py CHANGED
@@ -16,39 +16,39 @@ if option == 'MILESTONE 3':
16
 
17
  st.write('test1')
18
 
19
- model_name_0 = "Rathgeberj/milestone3_0"
20
  model_0 = AutoModelForSequenceClassification.from_pretrained(model_name_0)
21
  tokenizer_0 = AutoTokenizer.from_pretrained(model_name_0)
22
  classifier_0 = pipeline(task="sentiment-analysis", model=model_0, tokenizer=tokenizer_0)
23
 
24
- model_name_1 = "Rathgeberj/milestone3_1"
25
- model_1 = AutoModelForSequenceClassification.from_pretrained(model_name_1)
26
- tokenizer_1 = AutoTokenizer.from_pretrained(model_name_1)
27
- classifier_1 = pipeline(task="sentiment-analysis", model=model_1, tokenizer=tokenizer_1)
28
-
29
- model_name_2 = "Rathgeberj/milestone3_2"
30
- model_2 = AutoModelForSequenceClassification.from_pretrained(model_name_2)
31
- tokenizer_2 = AutoTokenizer.from_pretrained(model_name_2)
32
- classifier_2 = pipeline(task="sentiment-analysis", model=model_2, tokenizer=tokenizer_2)
33
-
34
- model_name_3 = "Rathgeberj/milestone3_3"
35
- model_3 = AutoModelForSequenceClassification.from_pretrained(model_name_3)
36
- tokenizer_3 = AutoTokenizer.from_pretrained(model_name_3)
37
- classifier_3 = pipeline(task="sentiment-analysis", model=model_3, tokenizer=tokenizer_3)
38
-
39
- model_name_4 = "Rathgeberj/milestone3_4"
40
- model_4 = AutoModelForSequenceClassification.from_pretrained(model_name_4)
41
- tokenizer_4 = AutoTokenizer.from_pretrained(model_name_4)
42
- classifier_4 = pipeline(task="sentiment-analysis", model=model_4, tokenizer=tokenizer_4)
43
-
44
- model_name_5 = "Rathgeberj/milestone3_5"
45
- model_5 = AutoModelForSequenceClassification.from_pretrained(model_name_5)
46
- tokenizer_5 = AutoTokenizer.from_pretrained(model_name_5)
47
- classifier_5 = pipeline(task="sentiment-analysis", model=model_5, tokenizer=tokenizer_5)
48
-
49
- models = [model_0, model_1, model_2, model_3, model_4, model_5]
50
- tokenizers = [tokenizer_0, tokenizer_1, tokenizer_2, tokenizer_3, tokenizer_4, tokenizer_5]
51
- classifiers = [classifier_0, classifier_1, classifier_2, classifier_3, classifier_4, classifier_5]
52
 
53
  # X_train = [textIn]
54
  # batch = tokenizer(X_train, padding=True, truncation=True, max_length=512, return_tensors="pt")
 
16
 
17
  st.write('test1')
18
 
19
+ model_name_0 = "milestone3_0"
20
  model_0 = AutoModelForSequenceClassification.from_pretrained(model_name_0)
21
  tokenizer_0 = AutoTokenizer.from_pretrained(model_name_0)
22
  classifier_0 = pipeline(task="sentiment-analysis", model=model_0, tokenizer=tokenizer_0)
23
 
24
+ # model_name_1 = "Rathgeberj/milestone3_1"
25
+ # model_1 = AutoModelForSequenceClassification.from_pretrained(model_name_1)
26
+ # tokenizer_1 = AutoTokenizer.from_pretrained(model_name_1)
27
+ # classifier_1 = pipeline(task="sentiment-analysis", model=model_1, tokenizer=tokenizer_1)
28
+
29
+ # model_name_2 = "Rathgeberj/milestone3_2"
30
+ # model_2 = AutoModelForSequenceClassification.from_pretrained(model_name_2)
31
+ # tokenizer_2 = AutoTokenizer.from_pretrained(model_name_2)
32
+ # classifier_2 = pipeline(task="sentiment-analysis", model=model_2, tokenizer=tokenizer_2)
33
+
34
+ # model_name_3 = "Rathgeberj/milestone3_3"
35
+ # model_3 = AutoModelForSequenceClassification.from_pretrained(model_name_3)
36
+ # tokenizer_3 = AutoTokenizer.from_pretrained(model_name_3)
37
+ # classifier_3 = pipeline(task="sentiment-analysis", model=model_3, tokenizer=tokenizer_3)
38
+
39
+ # model_name_4 = "Rathgeberj/milestone3_4"
40
+ # model_4 = AutoModelForSequenceClassification.from_pretrained(model_name_4)
41
+ # tokenizer_4 = AutoTokenizer.from_pretrained(model_name_4)
42
+ # classifier_4 = pipeline(task="sentiment-analysis", model=model_4, tokenizer=tokenizer_4)
43
+
44
+ # model_name_5 = "Rathgeberj/milestone3_5"
45
+ # model_5 = AutoModelForSequenceClassification.from_pretrained(model_name_5)
46
+ # tokenizer_5 = AutoTokenizer.from_pretrained(model_name_5)
47
+ # classifier_5 = pipeline(task="sentiment-analysis", model=model_5, tokenizer=tokenizer_5)
48
+
49
+ # models = [model_0, model_1, model_2, model_3, model_4, model_5]
50
+ # tokenizers = [tokenizer_0, tokenizer_1, tokenizer_2, tokenizer_3, tokenizer_4, tokenizer_5]
51
+ # classifiers = [classifier_0, classifier_1, classifier_2, classifier_3, classifier_4, classifier_5]
52
 
53
  # X_train = [textIn]
54
  # batch = tokenizer(X_train, padding=True, truncation=True, max_length=512, return_tensors="pt")