|
|
|
|
|
|
|
|
|
import gradio as gr |
|
|
|
def predict_amputation(age, gender, race, diabetes_type): |
|
return "ALLAH" |
|
|
|
|
|
|
|
title = "DIabetes-related Amputation Risk Calculator (DIARC)" |
|
|
|
description = "A diabetes-related amputation machine learning model trained on the diabetes dataset from the Inkosi Albert Luthuli Central Hospital (IALCH) in Durban, KwaZulu-Natal, South Africa." |
|
|
|
|
|
iface = gr.Interface( |
|
fn=predict_amputation, |
|
title=title, |
|
description=description, |
|
inputs=[gr.inputs.Number(default=None), gr.inputs.Dropdown(["Female", "Male"], default="Male"), gr.inputs.Dropdown(["Asian", "Black", "Coloured", "White", "Other"], default="Asian"), gr.inputs.Dropdown(["1", "2"], default="1")], |
|
outputs="text", |
|
theme="darkdefault", |
|
examples=[ |
|
[50, "Male", "Black", 2], |
|
[76, "Female", "Asian", 2], |
|
[12, "Female", "White", 1], |
|
[30, "Male", "Coloured", 1], |
|
[65, "Female", "Other", 2], |
|
], |
|
) |
|
|
|
if __name__ == "__main__": |
|
iface.launch() |