Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -189,14 +189,9 @@ def handle_custom_question(question):
|
|
| 189 |
lowest_year = liabilities_by_year.idxmin()
|
| 190 |
lowest_value = liabilities_by_year.min()
|
| 191 |
return f"The year with the least amount of liabilities was {lowest_year} with ${lowest_value:,.2f}.", None
|
| 192 |
-
if "
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
fig, ax = plt.subplots()
|
| 196 |
-
grouped.plot(kind="bar", ax=ax)
|
| 197 |
-
ax.set_title("Total Assets by Quarter (Last 2 Years)")
|
| 198 |
-
ax.set_ylabel("USD ($)")
|
| 199 |
-
return "Here is the total assets by quarter for the last 2 years.", to_img(fig)
|
| 200 |
|
| 201 |
# === Free Cash Flow trend (last 8 quarters) ===
|
| 202 |
if "free cash flow" in question.lower() or "fcf" in question.lower():
|
|
|
|
| 189 |
lowest_year = liabilities_by_year.idxmin()
|
| 190 |
lowest_value = liabilities_by_year.min()
|
| 191 |
return f"The year with the least amount of liabilities was {lowest_year} with ${lowest_value:,.2f}.", None
|
| 192 |
+
if "asset" in q and ("graph" in q or "plot" in q or "quarter" in q):
|
| 193 |
+
image = plot_assets_by_quarter_last_two_years()
|
| 194 |
+
return "Here is the total assets by quarter for the last 2 years.", image
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
|
| 196 |
# === Free Cash Flow trend (last 8 quarters) ===
|
| 197 |
if "free cash flow" in question.lower() or "fcf" in question.lower():
|