Darvin commited on
Commit
bcc6329
·
1 Parent(s): 37ce758

Added INIT_AGE as lever

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,15 +1,16 @@
1
- from portfolio import np, pretty_num, portfolio, INIT_AGE, INFLATION_RATE
2
 
3
  import gradio as gr
4
 
5
  import matplotlib
6
  import matplotlib.pyplot as plt
7
 
8
- def net_worth_calculator(Annual_Spending,Current_Income,Retirement_Age,
9
  Current_Checking,Current_Savings,Current_Brokerage,
10
  Current_Roth_401k,Current_Pretax_401k,Current_Roth_IRA,Current_Pretax_IRA):
11
  INIT_SPENDING = Annual_Spending
12
  INIT_SALARY = Current_Income
 
13
  INIT_RETIREAGE = Retirement_Age
14
  init_checkings = Current_Checking
15
  init_savings = Current_Savings
@@ -77,6 +78,7 @@ def net_worth_calculator(Annual_Spending,Current_Income,Retirement_Age,
77
  gr.Interface(fn=net_worth_calculator,
78
  inputs = [gr.Slider(minimum=0, maximum=1000e3, value=100e3, step=10e3),
79
  gr.Slider(minimum=0, maximum=1000e3, value=100e3, step=10e3),
 
80
  gr.Slider(minimum=31, maximum=100, value=65, step=1),
81
  gr.Slider(minimum=0, maximum=1000e3, value=100e3, step=10e3),
82
  gr.Slider(minimum=0, maximum=1000e3, value=100e3, step=10e3),
 
1
+ from portfolio import np, pretty_num, portfolio, INFLATION_RATE
2
 
3
  import gradio as gr
4
 
5
  import matplotlib
6
  import matplotlib.pyplot as plt
7
 
8
+ def net_worth_calculator(Annual_Spending,Current_Income,Current_Age,Retirement_Age,
9
  Current_Checking,Current_Savings,Current_Brokerage,
10
  Current_Roth_401k,Current_Pretax_401k,Current_Roth_IRA,Current_Pretax_IRA):
11
  INIT_SPENDING = Annual_Spending
12
  INIT_SALARY = Current_Income
13
+ INIT_AGE = Current_Age
14
  INIT_RETIREAGE = Retirement_Age
15
  init_checkings = Current_Checking
16
  init_savings = Current_Savings
 
78
  gr.Interface(fn=net_worth_calculator,
79
  inputs = [gr.Slider(minimum=0, maximum=1000e3, value=100e3, step=10e3),
80
  gr.Slider(minimum=0, maximum=1000e3, value=100e3, step=10e3),
81
+ gr.Slider(minimum=31, maximum=100, value=30, step=1),
82
  gr.Slider(minimum=31, maximum=100, value=65, step=1),
83
  gr.Slider(minimum=0, maximum=1000e3, value=100e3, step=10e3),
84
  gr.Slider(minimum=0, maximum=1000e3, value=100e3, step=10e3),