Spaces:
Runtime error
Runtime error
Jeffrey Rathgeber Jr
commited on
testfunc
Browse files
app.py
CHANGED
@@ -5,6 +5,9 @@ from textblob import TextBlob
|
|
5 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
6 |
import torch
|
7 |
import torch.nn.functional as F
|
|
|
|
|
|
|
8 |
|
9 |
textIn = st.text_input("Input Text Here:", "I really like the color of your car!")
|
10 |
|
@@ -16,8 +19,9 @@ if option == 'MILESTONE 3':
|
|
16 |
|
17 |
st.write('test1')
|
18 |
|
19 |
-
model_name_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 |
|
|
|
5 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
6 |
import torch
|
7 |
import torch.nn.functional as F
|
8 |
+
from transformers import BertForMaskedLM
|
9 |
+
|
10 |
+
model = BertForMaskedLM.from_pretrained("remi/bertabs-finetuned-extractive-abstractive-summarization")
|
11 |
|
12 |
textIn = st.text_input("Input Text Here:", "I really like the color of your car!")
|
13 |
|
|
|
19 |
|
20 |
st.write('test1')
|
21 |
|
22 |
+
model_name_0 = "Rathgeberj/milestone3_1"
|
23 |
+
# model_0 = AutoModelForSequenceClassification.from_pretrained(model_name_0)
|
24 |
+
model_0 = BertForMaskedLM.from_pretrained("Rathgeberj/milestone3_0")
|
25 |
tokenizer_0 = AutoTokenizer.from_pretrained(model_name_0)
|
26 |
classifier_0 = pipeline(task="sentiment-analysis", model=model_0, tokenizer=tokenizer_0)
|
27 |
|