Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
def house_saving(annual_salary, portion_saved, total_cost, portion_down_payment):
|
4 |
-
if (annual_salary * portion_saved) / 12 > total_cost:
|
5 |
return 1
|
6 |
else:
|
7 |
-
months = (total_cost * portion_down_payment
|
8 |
return round(months,0)
|
9 |
|
10 |
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
def house_saving(annual_salary, portion_saved, total_cost, portion_down_payment):
|
4 |
+
if (annual_salary * portion_saved) / 12 > total_cost * portion_down_payment:
|
5 |
return 1
|
6 |
else:
|
7 |
+
months = (total_cost * portion_down_payment) / ((annual_salary * portion_saved) / 12)
|
8 |
return round(months,0)
|
9 |
|
10 |
|