Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -214,7 +214,7 @@ def generate_text(df, country, theme):
|
|
214 |
Summarize the adverse growth for {theme} in {country}. Highlight any increase or decrease compared to previous years and include the cumulative result.
|
215 |
"""
|
216 |
prompt = f"""
|
217 |
-
Here are two examples of how to
|
218 |
|
219 |
Example 1 (Australia - GDP):
|
220 |
Country: Australia
|
@@ -224,7 +224,7 @@ def generate_text(df, country, theme):
|
|
224 |
Adverse Cumulative: -3.573762
|
225 |
The topic is GDP.
|
226 |
|
227 |
-
|
228 |
In the adverse scenario, the growth for GDP in Australia 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%.
|
229 |
|
230 |
Example 2 (Poland - HICP):
|
@@ -235,15 +235,15 @@ def generate_text(df, country, theme):
|
|
235 |
Adverse Cumulative: 32.79156
|
236 |
The topic is HICP.
|
237 |
|
238 |
-
|
239 |
In the adverse scenario, the HICP rate in Poland was 17.656378% in 2023, decreased to 8.188389% in 2024, and continued to decrease to 4.321625% in 2025. The cumulative adverse HICP rate over the period is 32.79156%.
|
240 |
|
241 |
-
Now, use the following data for {theme} in {country} to generate a similar
|
242 |
|
243 |
Example 3 ({country} - {theme}):
|
244 |
{row_str}
|
245 |
|
246 |
-
The topic is {theme}.
|
247 |
"""
|
248 |
|
249 |
|
|
|
214 |
Summarize the adverse growth for {theme} in {country}. Highlight any increase or decrease compared to previous years and include the cumulative result.
|
215 |
"""
|
216 |
prompt = f"""
|
217 |
+
Here are two examples of how to describe adverse growth data for a given country:
|
218 |
|
219 |
Example 1 (Australia - GDP):
|
220 |
Country: Australia
|
|
|
224 |
Adverse Cumulative: -3.573762
|
225 |
The topic is GDP.
|
226 |
|
227 |
+
Description:
|
228 |
In the adverse scenario, the growth for GDP in Australia 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%.
|
229 |
|
230 |
Example 2 (Poland - HICP):
|
|
|
235 |
Adverse Cumulative: 32.79156
|
236 |
The topic is HICP.
|
237 |
|
238 |
+
Description:
|
239 |
In the adverse scenario, the HICP rate in Poland was 17.656378% in 2023, decreased to 8.188389% in 2024, and continued to decrease to 4.321625% in 2025. The cumulative adverse HICP rate over the period is 32.79156%.
|
240 |
|
241 |
+
Now, use the following data for {theme} in {country} to generate a similar description:
|
242 |
|
243 |
Example 3 ({country} - {theme}):
|
244 |
{row_str}
|
245 |
|
246 |
+
The topic is {theme}. Describe the data, ensuring that the describe reflects the theme accurately. Follow the pattern of the examples provided and describe any changes in values using terms like 'increase' and 'decrease'. Make sure the output aligns with the data.
|
247 |
"""
|
248 |
|
249 |
|