Cachoups commited on
Commit
efa46f3
·
verified ·
1 Parent(s): 385d234

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -9
app.py CHANGED
@@ -333,25 +333,21 @@ def generate_text(df, country, theme):
333
  Describe, using the similar pattern from the example, the changes for the provided country and years. Highlight how the values change year by year and whether they increased or decreased. Do not mention any other countries or years, and describe exactly what is in the table. Keep the description simple and direct.
334
  """
335
  prompt = f"""
336
- Here is an example of how to describe adverse growth data table for a given country:
337
 
338
  Country: Australia
339
  Adverse 1990: -0.43%
340
  Adverse 1991: -1.99%
341
  Adverse 1992: -1.20%
342
  Adverse Cumulative: -3.57%
343
- Topic: GDP
344
 
345
- Here is the description:
346
- In the adverse scenario, the GDP 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%.
347
 
348
- Now, using the following data table for {theme} in {country}, describe the adverse growth:
349
  {row_str}
350
- Topic: {theme}
351
-
352
- Describe the adverse growth in the provided data year by year following the pattern in the example, highlighting whether the values increased or decreased each year.
353
  """
354
- prompt = f"""
355
  Given the following adverse growth data for {theme} in {country}:
356
 
357
  {row_str}
 
333
  Describe, using the similar pattern from the example, the changes for the provided country and years. Highlight how the values change year by year and whether they increased or decreased. Do not mention any other countries or years, and describe exactly what is in the table. Keep the description simple and direct.
334
  """
335
  prompt = f"""
336
+ Example:
337
 
338
  Country: Australia
339
  Adverse 1990: -0.43%
340
  Adverse 1991: -1.99%
341
  Adverse 1992: -1.20%
342
  Adverse Cumulative: -3.57%
 
343
 
344
+ Description:
345
+ 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%.
346
 
347
+ Now, using the following data for {theme} in {country}, describe how the adverse growth changed each year, whether it increased or decreased, and provide the cumulative growth:
348
  {row_str}
 
 
 
349
  """
350
+ prompt1 = f"""
351
  Given the following adverse growth data for {theme} in {country}:
352
 
353
  {row_str}