Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -245,6 +245,29 @@ def generate_text(df, country, theme):
|
|
245 |
The topic is {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, include the cumulative result, and reflect the data as it appears.
|
247 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
|
249 |
|
250 |
|
|
|
245 |
The topic is {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, include the cumulative result, and reflect the data as it appears.
|
247 |
"""
|
248 |
+
prompt = f"""
|
249 |
+
Here is an example of how to describe adverse growth data for a given country:
|
250 |
+
|
251 |
+
Country: Australia
|
252 |
+
Adverse 2020: -0.43%
|
253 |
+
Adverse 2021: -1.99%
|
254 |
+
Adverse 2022: -1.20%
|
255 |
+
Adverse Cumulative: -3.57%
|
256 |
+
|
257 |
+
Description:
|
258 |
+
In the adverse scenario, the GDP growth in Australia was -0.43% in 2020. It decreased further to -1.99% in 2021, showing worsening conditions. However, there was a slight improvement to -1.20% in 2022. The total cumulative adverse growth is -3.57%.
|
259 |
+
|
260 |
+
Now, using the following data for {theme} in {country}, perform the following:
|
261 |
+
1. Highlight how the values change from year to year.
|
262 |
+
2. Describe whether the values increased or decreased compared to the previous year.
|
263 |
+
3. Indicate if the changes represent a worsening or improvement, and if this is strong or slight.
|
264 |
+
4. Include the cumulative result.
|
265 |
+
|
266 |
+
Data:
|
267 |
+
{row_str}
|
268 |
+
|
269 |
+
The topic is {theme}. Make sure your description follows the example format and accurately reflects the data.
|
270 |
+
"""
|
271 |
|
272 |
|
273 |
|