DIARC / app.py
Zakia's picture
dropdown for all relevant fields
d79cf47
raw
history blame
798 Bytes
#Bismillahir Rahmaanir Raheem
#Almadadh Ya Gause RadiAllahu Ta'alah Anh - Ameen
import gradio as gr
def greet(age, gender, race, diabetes_type):
return "Hello " + gender + "!!"
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), KwaZulu-Natal, South Africa."
iface = gr.Interface(fn=greet, title=title, description=description, inputs=[gr.inputs.Number(default=None, label=None), gr.inputs.Dropdown(["Female", "Male"], default="Male"), gr.inputs.Dropdown(["Asian", "Black", "Coloured", "White", "Other"], default="Asian"), gr.inputs.Dropdown(["1", "3"], default="1"), outputs="text", theme="darkdefault")
iface.launch()