sanjana commited on
Commit
032e42d
1 Parent(s): 79ccab8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -155,11 +155,11 @@ def pred(Gender, Marital_Status, Dependents, Education, Self_Employed, Loan_Amou
155
  se=1
156
  elif Self_Employed=="No":
157
  se=0
158
- if Property_Area=="0":
159
  pa=0
160
- elif Property_Area=="1":
161
  pa=1
162
- elif Propert_Area=="2":
163
  pa=2
164
 
165
  l = {'Gender': [gen],
@@ -183,6 +183,6 @@ def pred(Gender, Marital_Status, Dependents, Education, Self_Employed, Loan_Amou
183
 
184
  iface = gr.Interface(
185
  fn=pred,
186
- inputs=[gr.inputs.Radio(["Male", "Female"]), gr.inputs.Radio(["Married", "Unmarried"]),gr.inputs.Radio(["0", "1","2", "3+"]), gr.inputs.Radio(["Educated", "Uneducated"]), gr.inputs.Radio(["Yes", "No"]), "text", gr.inputs.Radio(["1", "0"]), gr.inputs.Radio(["Urban", "Semi Urban", "Rural"]), "text"],
187
  outputs="text")
188
  iface.launch(inline=False)
 
155
  se=1
156
  elif Self_Employed=="No":
157
  se=0
158
+ if Property_Area=="Urban":
159
  pa=0
160
+ elif Property_Area=="Semi_Urban":
161
  pa=1
162
+ elif Propert_Area=="Rural":
163
  pa=2
164
 
165
  l = {'Gender': [gen],
 
183
 
184
  iface = gr.Interface(
185
  fn=pred,
186
+ inputs=[gr.inputs.Radio(["Male", "Female"]), gr.inputs.Radio(["Married", "Unmarried"]),gr.inputs.Radio(["0", "1","2", "3+"]), gr.inputs.Radio(["Educated", "Uneducated"]), gr.inputs.Radio(["Yes", "No"]), "text", gr.inputs.Radio(["1", "0"]), gr.inputs.Radio(["Urban", "Semi_Urban", "Rural"]), "text"],
187
  outputs="text")
188
  iface.launch(inline=False)