Downloads · 30 days
0
Abdullah1211/ml-stroke
ml-stroke is a machine learning model from Abdullah1211. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model predicts the risk of stroke based on demographic and health-related features.
Downloads · 30 days
0
Access
Public
Updated Apr 13, 2025
Repo size
6.1 KB
Likes
0
Public
Click a slice to open those files.
.joblib6.1 KB · 46%
From the Hugging Face model README
This model predicts the risk of stroke based on demographic and health-related features.
You can use this model through the Hugging Face Inference API:
import requests
API_URL = "https://abdullah1211-ml-stroke.hf.space"
headers = {"Content-Type": "application/json"}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
data = {
"gender": "Male",
"age": 67,
"hypertension": 1,
"heart_disease": 0,
"ever_married": "Yes",
"work_type": "Private",
"Residence_type": "Urban",
"avg_glucose_level": 228.69,
"bmi": 36.6,
"smoking_status": "formerly smoked"
}
output = query(data)
print(output)
{
"probability": 0.72,
"prediction": "High Risk",
"stroke_prediction": 1
}