IvaElen commited on
Commit
bf3b114
·
1 Parent(s): da68874

Update pages/GPT.py

Browse files
Files changed (1) hide show
  1. pages/GPT.py +1 -2
pages/GPT.py CHANGED
@@ -15,8 +15,7 @@ def load_model():
15
  return model_finetuned, tokenizer
16
 
17
  def preprocess_text(text_input, tokenizer):
18
- prompt = tokenizer.encode(text_input, return_tensors='pt').to(device)
19
- return prompt
20
 
21
  def predict_sentiment(model, prompt, temp, num_generate):
22
  result = model.generate(
 
15
  return model_finetuned, tokenizer
16
 
17
  def preprocess_text(text_input, tokenizer):
18
+ prompt = tokenizer.encode(text_input, return_tensors='pt')
 
19
 
20
  def predict_sentiment(model, prompt, temp, num_generate):
21
  result = model.generate(