Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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(
|
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')
|