Cachoups commited on
Commit
a0c1179
·
verified ·
1 Parent(s): 5857e91

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -16
app.py CHANGED
@@ -206,25 +206,20 @@ def generate_text(df, country, theme):
206
 
207
  # Create the prompt
208
  prompt = f"""
209
- Here is an example:
210
- A table from France country:
211
- Country France
212
- Adverse 2020 -0.427975
213
- Adverse 2021 -1.987167
214
- Adverse 2022 -1.195906
215
- Adverse Cumulative -3.573762
216
 
217
- The theme is GDP
218
-
219
- The output:
220
- In adverse scenario, the growth for GDP in France is -0.427975% in 2020, -1.98767% in 2021 and -1.195906% in 2022.
221
-
222
- Here is another table:
223
  {row_str}
224
-
225
- The theme is {theme}
226
 
227
- Summarize the adverse scenario growth for {theme} in {country} based on the data above, following a similar pattern to the example for France and add the words increase and decrease depending of numerical values.
228
  """
229
 
230
  # Generate the descriptive text using the model
 
206
 
207
  # Create the prompt
208
  prompt = f"""
209
+ Here is an example of how to summarize data for France:
210
+ Adverse 2020: -0.427975
211
+ Adverse 2021: -1.987167
212
+ Adverse 2022: -1.195906
213
+ Adverse Cumulative: -3.573762
 
 
214
 
215
+ The theme is GDP.
216
+ Output:
217
+ In adverse scenario, the growth for GDP in France is -0.427975% in 2020, -1.987167% in 2021, and -1.195906% in 2022.
218
+
219
+ Now summarize the adverse scenario growth for {theme} in {country} based on the data below:
 
220
  {row_str}
 
 
221
 
222
+ Ensure that you follow a similar pattern to the example for France. Use the terms 'increase' and 'decrease' based on the changes in the values.
223
  """
224
 
225
  # Generate the descriptive text using the model