Cachoups commited on
Commit
3a7987b
·
verified ·
1 Parent(s): e35a47f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -214,17 +214,22 @@ def generate_text(df, country, theme):
214
  Adverse 2022: -1.195906
215
  Adverse Cumulative: -3.573762
216
 
217
- The theme is GDP.
218
  Summary:
219
- 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, resulting in an adverse cumulative decrease of -3.573762%.
220
 
221
  Now, use the following data for {theme} in {country} to generate a similar summary:
222
  {row_str}
223
 
224
- The theme is {theme}. Ensure that the summary reflects the theme accurately and follows the pattern from the example. Highlight any improvements or worsening compared to previous years and include a cumulative result if applicable. Use terms 'increase' and 'decrease' to describe changes in values, and make sure the output aligns with the provided data.
 
 
 
 
225
  """
226
 
227
 
 
228
  # Generate the descriptive text using the model
229
  result = table_to_text(prompt, max_length=200)[0]['generated_text']
230
 
 
214
  Adverse 2022: -1.195906
215
  Adverse Cumulative: -3.573762
216
 
217
+ The topic is GDP.
218
  Summary:
219
+ 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%.
220
 
221
  Now, use the following data for {theme} in {country} to generate a similar summary:
222
  {row_str}
223
 
224
+ The topic is {theme}. Ensure that the summary:
225
+ - Reflects the theme accurately
226
+ - Highlights any improvements or worsening compared to previous years
227
+ - Includes a cumulative result if applicable
228
+ - Uses terms 'increase' and 'decrease' to describe changes
229
  """
230
 
231
 
232
+
233
  # Generate the descriptive text using the model
234
  result = table_to_text(prompt, max_length=200)[0]['generated_text']
235