AhmedSaghir's picture
Update app.py
5ec1633 verified
raw
history blame
582 Bytes
import gradio as gr
import joblib
import sklearn
our_trained_model =joblib.load("our_model.sav")
def greet(preg, plas, pres, skin, test, mass, pedi, age):
result = our_trained_model.predict([[int(preg), int(plas), int(pres), int(skin), int(test), int(mass), int(pedi), int(age)]])
var = int(result[0])
if var == 0:
result = "Negative"
else:
result = "Positive"
return "Is the Patient Diabetic: " + str(result)
demo = gr.Interface(
fn=greet,
inputs=["text", "text","text", "text","text", "text","text", "text"],
outputs=["text"],
)
demo.launch()