Cachoups commited on
Commit
93fbdd1
·
verified ·
1 Parent(s): ae1af52

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -243,7 +243,8 @@ def generate_text(df, country, theme):
243
  Now, using the following data for {theme} in {country}, describe the adverse growth:
244
  {row_str}
245
  Topic: {theme}
246
- Describe by highlighting changes between those three years. Accurately describe whether the values increase or decrease, whether it worsened or improved, strongly or slightly, and reflect the data as it appears.
 
247
  """
248
  prompt1 = f"""
249
  Here is an example of how to describe adverse growth data for a given country:
@@ -271,7 +272,7 @@ def generate_text(df, country, theme):
271
  """
272
 
273
  # Generate the descriptive text using the model
274
- result = table_to_text(prompt, max_length=248, temperature = 0.7, top_p = 0.9, do_sample = True)[0]['generated_text']
275
 
276
  return result
277
  # Global variable
 
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, whether it worsened or improved 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
  """
273
 
274
  # Generate the descriptive text using the model
275
+ result = table_to_text(prompt, max_length=248)[0]['generated_text']
276
 
277
  return result
278
  # Global variable