Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -213,10 +213,9 @@ def generate_text(df, country, theme):
|
|
213 |
|
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 |
-
|
217 |
-
|
218 |
-
|
219 |
-
Example 1 (Australia - GDP):
|
220 |
Country: Australia
|
221 |
Adverse 2020: -0.427975
|
222 |
Adverse 2021: -1.987167
|
@@ -225,14 +224,14 @@ def generate_text(df, country, theme):
|
|
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 |
-
Now, use the following data for {theme} in {country} to generate a similar description:
|
231 |
-
|
232 |
-
Example 2 ({country} - {theme}):
|
233 |
-
{row_str}
|
234 |
|
235 |
-
|
|
|
|
|
|
|
|
|
|
|
236 |
"""
|
237 |
|
238 |
|
|
|
213 |
|
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 |
+
|
217 |
+
prompt = f"""
|
218 |
+
Here is an example of how to describe adverse growth data for a given country:
|
|
|
219 |
Country: Australia
|
220 |
Adverse 2020: -0.427975
|
221 |
Adverse 2021: -1.987167
|
|
|
224 |
The topic is GDP.
|
225 |
|
226 |
Description:
|
227 |
+
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%.
|
|
|
|
|
|
|
|
|
|
|
228 |
|
229 |
+
Now, using the following data for {theme} in {country}, describe the adverse growth:
|
230 |
+
{row_str}
|
231 |
+
The topic is {theme}.
|
232 |
+
Make sure to highlight changes compared to previous years, include cumulative results, and reflect the data accurately following the example.
|
233 |
+
"""
|
234 |
+
The topic is {theme}. Explain the data, ensuring that the description 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.
|
235 |
"""
|
236 |
|
237 |
|