Cachoups commited on
Commit
0582ad6
·
verified ·
1 Parent(s): b2df15a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -240,11 +240,11 @@ def generate_text(df, country, theme):
240
  Description:
241
  In the adverse scenario, the GDP growth in Australia was -0.43% in 1990. It decreased further to -1.99% in 1991, showing worsening conditions. There was a slight improvement to -1.20% in 1992. The total cumulative adverse growth is -3.57%.
242
 
243
- Now, using the following data for {theme} in {country}, describe the adverse growth:
244
  {row_str}
245
  Topic: {theme}
246
 
247
- Describe by highlighting changes between those three years. Accurately describe whether the values increase or decrease and reflect the data as it appears.
248
  """
249
  prompt1 = f"""
250
  Here is an example of how to describe adverse growth data for a given country:
@@ -272,7 +272,7 @@ def generate_text(df, country, theme):
272
  """
273
 
274
  # Generate the descriptive text using the model
275
- result = table_to_text(prompt, max_length=248, temperature = 0.7, top_p = 0.3)[0]['generated_text']
276
 
277
  return result
278
  # Global variable
 
240
  Description:
241
  In the adverse scenario, the GDP growth in Australia was -0.43% in 1990. It decreased further to -1.99% in 1991, showing worsening conditions. There was a slight improvement to -1.20% in 1992. The total cumulative adverse growth is -3.57%.
242
 
243
+ Now, using the following data for {theme} in {country}:
244
  {row_str}
245
  Topic: {theme}
246
 
247
+ Your task is to: describe the changes year by year, indicate whether the values increased or decreased, do not introduce new countries or years, and reflect the data as it appears in the table.
248
  """
249
  prompt1 = f"""
250
  Here is an example of how to describe adverse growth data for a given country:
 
272
  """
273
 
274
  # Generate the descriptive text using the model
275
+ result = table_to_text(prompt, max_length=240)[0]['generated_text']
276
 
277
  return result
278
  # Global variable