Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ 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 =
|
8 |
return months
|
9 |
|
10 |
|
@@ -17,6 +17,14 @@ demo = gr.Interface(
|
|
17 |
"number"
|
18 |
],
|
19 |
outputs="number",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
)
|
21 |
|
22 |
demo.launch()
|
|
|
4 |
if (annual_salary * portion_saved) / 12 > total_cost:
|
5 |
return 1
|
6 |
else
|
7 |
+
months = (total_cost * protion_down_payment - portion_saved) / ((annual_salary * portion_saved) / 12)
|
8 |
return months
|
9 |
|
10 |
|
|
|
17 |
"number"
|
18 |
],
|
19 |
outputs="number",
|
20 |
+
examples=[
|
21 |
+
[100, 0.1, 1000, 0.2],
|
22 |
+
[100, 0.1, 1000, 0.2],
|
23 |
+
[100, 0.1, 1000, 0.2],
|
24 |
+
[100, 0.1, 1000, 0.2],
|
25 |
+
],
|
26 |
+
title="House Saving Time Calculator",
|
27 |
+
description="heres a house saving time calculator. Enjoy!"
|
28 |
)
|
29 |
|
30 |
demo.launch()
|