Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,8 @@ def predict_death_event(feature1, feature2, feature3,feature4, feature5, feature
|
|
53 |
|
54 |
# Function for updating metrics
|
55 |
def update_metrics():
|
56 |
-
|
|
|
57 |
test_text = test['Text'].values
|
58 |
test_pred = sentiment_model(list(test_text))
|
59 |
pred_labels = [int(pred['label'].split("_")[1]) for pred in test_pred]
|
|
|
53 |
|
54 |
# Function for updating metrics
|
55 |
def update_metrics():
|
56 |
+
global test_data
|
57 |
+
test = test_data.sample(50)
|
58 |
test_text = test['Text'].values
|
59 |
test_pred = sentiment_model(list(test_text))
|
60 |
pred_labels = [int(pred['label'].split("_")[1]) for pred in test_pred]
|