Spaces:
Sleeping
Sleeping
Joseph Spada
commited on
Commit
·
f4a34e2
1
Parent(s):
f989b25
slider updates
Browse files
app.py
CHANGED
@@ -153,13 +153,20 @@ with gr.Blocks() as interface:
|
|
153 |
|
154 |
gr.Markdown('<p style="font-size:11px;">Source: CBO June 2024 An Update to the Budget and Economic Outlook: 2024 to 2034, March 2024 report The Long-Term Budget Outlook: 2024 to 2054, and author\'s calculations. Scenario of higher interest rate is author\'s calculations. Data points for 2035-2054 calculated to build on CBO\'s June 2024 10-year update and be consistent with the March 2024 long-term report. Historical Social Security OASDI payroll tax revenue from Table 4-3 of the SSA\'s Trust Fund Data, and projections from the CBO\'s August 2024 Long Term Projections for Social Security.</p>')
|
155 |
|
156 |
-
# Set up an action that updates the graph when the slider value changes
|
157 |
interest_rate_slider.change(
|
158 |
plot_interest_coverage,
|
159 |
inputs = interest_rate_slider,
|
160 |
outputs = graph
|
161 |
)
|
162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
# Launch the interface
|
164 |
interface.launch(share = True)
|
165 |
|
|
|
153 |
|
154 |
gr.Markdown('<p style="font-size:11px;">Source: CBO June 2024 An Update to the Budget and Economic Outlook: 2024 to 2034, March 2024 report The Long-Term Budget Outlook: 2024 to 2054, and author\'s calculations. Scenario of higher interest rate is author\'s calculations. Data points for 2035-2054 calculated to build on CBO\'s June 2024 10-year update and be consistent with the March 2024 long-term report. Historical Social Security OASDI payroll tax revenue from Table 4-3 of the SSA\'s Trust Fund Data, and projections from the CBO\'s August 2024 Long Term Projections for Social Security.</p>')
|
155 |
|
156 |
+
# Set up an action that updates the graph when the interest rate slider value changes
|
157 |
interest_rate_slider.change(
|
158 |
plot_interest_coverage,
|
159 |
inputs = interest_rate_slider,
|
160 |
outputs = graph
|
161 |
)
|
162 |
|
163 |
+
# Set up an action that updates the graph when the revenues slider value changes
|
164 |
+
revenues_slider.change(
|
165 |
+
plot_interest_coverage,
|
166 |
+
inputs = revenues_slider,
|
167 |
+
outputs = graph
|
168 |
+
)
|
169 |
+
|
170 |
# Launch the interface
|
171 |
interface.launch(share = True)
|
172 |
|