Cachoups commited on
Commit
f64bab8
·
verified ·
1 Parent(s): 03106c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -305,7 +305,7 @@ def generate_text(df, country, theme):
305
  return "\n".join(formatted_row)
306
  # Convert the row to a string format for prompt
307
  year = int(re.search(r'(\d{4})', df.columns[1]).group(1))
308
- df.columns = ['Country', f'{year}', f'{year+1}', f'{year+2}', 'Cumulative']
309
  row = df[df['Country'] == country].iloc[0]
310
  row_str = format_row_for_prompt(row)
311
  #row_str = row.to_string(index=True)
@@ -342,7 +342,7 @@ def generate_text(df, country, theme):
342
  1990: -0.43%
343
  1991: -1.99%
344
  1992: -1.20%
345
- Cumulative: -3.57%
346
 
347
  Anwser:
348
  In the adverse scenario, the growth in Australia was -0.43% in 1990. It worsened to -1.99% in 1991 and slightly improved to -1.20% in 1992. The total cumulative adverse growth was -3.57% from 1990 to 1992.
 
305
  return "\n".join(formatted_row)
306
  # Convert the row to a string format for prompt
307
  year = int(re.search(r'(\d{4})', df.columns[1]).group(1))
308
+ df.columns = ['Country', f'{year}', f'{year+1}', f'{year+2}', 'Total']
309
  row = df[df['Country'] == country].iloc[0]
310
  row_str = format_row_for_prompt(row)
311
  #row_str = row.to_string(index=True)
 
342
  1990: -0.43%
343
  1991: -1.99%
344
  1992: -1.20%
345
+ Total: -3.57%
346
 
347
  Anwser:
348
  In the adverse scenario, the growth in Australia was -0.43% in 1990. It worsened to -1.99% in 1991 and slightly improved to -1.20% in 1992. The total cumulative adverse growth was -3.57% from 1990 to 1992.