Spaces:
Running
Running
Upload 16 files
Browse files
interface/dollar_cost_averaging_interface.py
CHANGED
|
@@ -11,7 +11,7 @@ old_price = gr.Number(label="Old Price", value=18153)
|
|
| 11 |
old_quantity = gr.Number(label="Quantity", value=122)
|
| 12 |
second_purchase = gr.Markdown("<h3 class='h3_title'>SECOND PURCHASE</h3>")
|
| 13 |
new_price = gr.Textbox(label="New Price", value="15000")
|
| 14 |
-
new_quantity = gr.
|
| 15 |
|
| 16 |
input = [old_price, old_quantity, new_price, new_quantity]
|
| 17 |
output = gr.HTML()
|
|
|
|
| 11 |
old_quantity = gr.Number(label="Quantity", value=122)
|
| 12 |
second_purchase = gr.Markdown("<h3 class='h3_title'>SECOND PURCHASE</h3>")
|
| 13 |
new_price = gr.Textbox(label="New Price", value="15000")
|
| 14 |
+
new_quantity = gr.Slider(label="Quantity", value=1)
|
| 15 |
|
| 16 |
input = [old_price, old_quantity, new_price, new_quantity]
|
| 17 |
output = gr.HTML()
|
modules/retirement_planning.py
CHANGED
|
@@ -229,18 +229,19 @@ def retirement_planning(
|
|
| 229 |
# HTML 결과 생성
|
| 230 |
result_html = css + f"""
|
| 231 |
<div class="wrap-text">
|
| 232 |
-
<div>
|
| 233 |
-
<div style="margin-bottom: 1.5rem;">
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
</div>
|
| 237 |
</div>
|
| 238 |
</div>
|
|
|
|
| 239 |
<div style="margin-bottom: 2rem;"></div>
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
</div>
|
|
|
|
| 244 |
""" + table_html + """
|
| 245 |
<p style="padding: 10px; border: 1px solid; border-radius: 5px; text-align: center; max-width: 400px; margin: 20px auto;">
|
| 246 |
<strong>Note:</strong> No additional investments or reinvestment of dividends after retirement.
|
|
|
|
| 229 |
# HTML 결과 생성
|
| 230 |
result_html = css + f"""
|
| 231 |
<div class="wrap-text">
|
| 232 |
+
<div style="margin-bottom: 1.5rem;">
|
| 233 |
+
<div style="font-size: 1.5rem; margin-top: 1.5rem; margin-bottom: 1.5rem;">Dividend-Based Retirement Planning</div>
|
| 234 |
+
<iframe src="data:text/html;base64,{svg_base64}" style="width: 100%; height: 400px; border: none;"></iframe>
|
| 235 |
+
<div style="display: flex; align-items: center; justify-content: flex-end;">💡Total Shortfall <span style="font-weight: bold; color: #1678fb">{abs(negative_differences_sum):,.0f}</span></div>
|
|
|
|
| 236 |
</div>
|
| 237 |
</div>
|
| 238 |
+
|
| 239 |
<div style="margin-bottom: 2rem;"></div>
|
| 240 |
+
|
| 241 |
+
<div style="margin-bottom: 2rem;"></div>
|
| 242 |
+
<div style="display: flex; align-items: center; justify-content: flex-end;">
|
| 243 |
+
<a href="data:text/csv;base64,{csv_base64}" download="retirement_planning.csv" style="padding: 10px 20px; border: 1px solid; border-radius: 5px; background-color: #1678fb; color: white; text-decoration: none;">Download CSV</a></div>
|
| 244 |
+
|
| 245 |
""" + table_html + """
|
| 246 |
<p style="padding: 10px; border: 1px solid; border-radius: 5px; text-align: center; max-width: 400px; margin: 20px auto;">
|
| 247 |
<strong>Note:</strong> No additional investments or reinvestment of dividends after retirement.
|