Cachoups commited on
Commit
999ea46
·
verified ·
1 Parent(s): 65106f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -211,27 +211,24 @@ def generate_text(df, country, theme):
211
  Summarize the adverse growth for {theme} in {country}. Highlight any increase or decrease compared to previous years and include the cumulative result.
212
  """
213
  prompt = f"""
214
- Here is an example of how to summarize adverse growth data:
215
 
216
- Example for France (GDP):
217
- Country: France
218
  Adverse 2020: -0.427975
219
  Adverse 2021: -1.987167
220
  Adverse 2022: -1.195906
221
  Adverse Cumulative: -3.573762
222
 
223
  Summary:
224
- In the adverse scenario, the growth for GDP in France decreased by -0.427975% in 2020, worsened further by -1.987167% in 2021, and slightly improved by -1.195906% in 2022. The cumulative adverse growth is -3.573762%.
225
 
226
  Now summarize the following data for {theme} in {country}:
227
  {row_str}
228
 
229
- The theme is {theme}. For the data provided:
230
- - Mention if the values have increased or decreased compared to previous years.
231
- - Include the cumulative result if available.
232
- - Follow the format in the example.
233
-
234
- Ensure the summary reflects the changes in the values clearly.
235
  """
236
 
237
 
 
211
  Summarize the adverse growth for {theme} in {country}. Highlight any increase or decrease compared to previous years and include the cumulative result.
212
  """
213
  prompt = f"""
214
+ Here is an example of a summary:
215
 
216
+ For France (GDP):
 
217
  Adverse 2020: -0.427975
218
  Adverse 2021: -1.987167
219
  Adverse 2022: -1.195906
220
  Adverse Cumulative: -3.573762
221
 
222
  Summary:
223
+ In the adverse scenario, the growth for GDP in France was -0.427975% in 2020, worsened to -1.987167% in 2021, and slightly improved to -1.195906% in 2022. The cumulative adverse growth is -3.573762%.
224
 
225
  Now summarize the following data for {theme} in {country}:
226
  {row_str}
227
 
228
+ The theme is {theme}. Please:
229
+ - Describe how the values changed each year.
230
+ - Mention the cumulative result if available.
231
+ - Use terms like 'increase' or 'decrease' based on the trends.
 
 
232
  """
233
 
234