thak123 commited on
Commit
e999bb0
1 Parent(s): 320f206

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
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
- "FFZG-cleopatra/M2SA",
99
- num_labels=3, id2label=id2label,
100
- label2id=label2id
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