DaviLima commited on
Commit
c37f475
·
1 Parent(s): 95491b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -52,9 +52,9 @@ def generate_predictions(text):
52
 
53
  # Make predictions
54
  sentence_prediction = predict(loaded_model, input_loader)[0]
55
- predictions.append(sentence + ":" + str(sentence_prediction))
56
 
57
- return predictions
58
 
59
  # Specify the device as CPU
60
  device = torch.device('cpu')
 
52
 
53
  # Make predictions
54
  sentence_prediction = predict(loaded_model, input_loader)[0]
55
+ predictions.append(sentence_prediction)
56
 
57
+ return predictions[0] # Return the first prediction instead of the whole list
58
 
59
  # Specify the device as CPU
60
  device = torch.device('cpu')