Zakia commited on
Commit
7d9a734
1 Parent(s): 059a8d3

made age to be numeric format

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -5,11 +5,13 @@
5
  import gradio as gr
6
 
7
  def greet(age, gender, race, diabetes_type):
8
- return "Hello " + age + "!!"
9
 
10
 
11
 
12
  title = "DIabetes-related Amputation Risk Calculator (DIARC)"
13
- 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, using Pycaret. Created as a demo with Gradio and hosted on HuggingFace Spaces"
14
- iface = gr.Interface(fn=greet, title=title, description=description, inputs=[gr.inputs.Textbox(placeholder="Age Here..."), gr.inputs.Textbox(placeholder="Gender Here..."), gr.inputs.Textbox(placeholder="Race Here..."), gr.inputs.Textbox(placeholder="Diabetes Type Here...")], outputs="text")
 
 
15
  iface.launch()
 
5
  import gradio as gr
6
 
7
  def greet(age, gender, race, diabetes_type):
8
+ return "Hello " + gender + "!!"
9
 
10
 
11
 
12
  title = "DIabetes-related Amputation Risk Calculator (DIARC)"
13
+ 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."
14
+
15
+
16
+ iface = gr.Interface(fn=greet, title=title, description=description, inputs=[gr.inputs.Number(self, default=None, label=None), gr.inputs.Textbox(placeholder="Gender Here..."), gr.inputs.Textbox(placeholder="Race Here..."), gr.inputs.Textbox(placeholder="Diabetes Type Here...")], outputs="text")
17
  iface.launch()