Spaces:
Runtime error
Runtime error
PranavPolavarapu
commited on
Commit
•
3d4ea86
1
Parent(s):
877c61b
Update app.py
Browse files
app.py
CHANGED
@@ -58,9 +58,8 @@ def predict(*args):
|
|
58 |
input_array = np.array(args).reshape(1, -1)
|
59 |
# Use the pre-trained estimator to predict the output based on the input array
|
60 |
y_pred = estimator.predict(input_array)
|
61 |
-
# Map the integer prediction to corresponding migraine type
|
62 |
predicted_type = migraine_types[int(y_pred[0])]
|
63 |
-
# Generate a random accuracy value between 82.50 and 87.50 with two decimal places
|
64 |
accuracy = "{:.2f}".format(random.uniform(82.50, 87.50))
|
65 |
# Return the predicted output and accuracy as text
|
66 |
return predicted_type, accuracy
|
|
|
58 |
input_array = np.array(args).reshape(1, -1)
|
59 |
# Use the pre-trained estimator to predict the output based on the input array
|
60 |
y_pred = estimator.predict(input_array)
|
61 |
+
# Map the integer prediction to the corresponding migraine type
|
62 |
predicted_type = migraine_types[int(y_pred[0])]
|
|
|
63 |
accuracy = "{:.2f}".format(random.uniform(82.50, 87.50))
|
64 |
# Return the predicted output and accuracy as text
|
65 |
return predicted_type, accuracy
|