Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -94,11 +94,11 @@ load_model(model, sf_filename)
|
|
94 |
# model.load_state_dict(torch.load(model_args.model_name_or_path+"-finetuned/pytorch_model.bin"))
|
95 |
|
96 |
|
97 |
-
model = AutoModelForSequenceClassification.from_pretrained(
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
|
103 |
|
104 |
def predict_sentiment(text, image):
|
@@ -124,7 +124,7 @@ def predict_sentiment(text, image):
|
|
124 |
}
|
125 |
prediction = None
|
126 |
with torch.no_grad():
|
127 |
-
prediction = model(model_input)
|
128 |
print(prediction)
|
129 |
return prediction
|
130 |
|
|
|
94 |
# model.load_state_dict(torch.load(model_args.model_name_or_path+"-finetuned/pytorch_model.bin"))
|
95 |
|
96 |
|
97 |
+
# model = AutoModelForSequenceClassification.from_pretrained(
|
98 |
+
# "FFZG-cleopatra/M2SA",
|
99 |
+
# num_labels=3, id2label=id2label,
|
100 |
+
# label2id=label2id
|
101 |
+
# )
|
102 |
|
103 |
|
104 |
def predict_sentiment(text, image):
|
|
|
124 |
}
|
125 |
prediction = None
|
126 |
with torch.no_grad():
|
127 |
+
prediction = model(*model_input)
|
128 |
print(prediction)
|
129 |
return prediction
|
130 |
|