Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -206,21 +206,23 @@ def generate_text(df, country, theme):
|
|
206 |
|
207 |
# Create the prompt
|
208 |
prompt = f"""
|
209 |
-
Here is an example of
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
Adverse
|
214 |
-
Adverse
|
|
|
|
|
215 |
|
216 |
The theme is GDP.
|
217 |
-
|
218 |
-
In adverse scenario, the growth for GDP in France
|
219 |
|
220 |
-
Now summarize the adverse scenario growth for {theme} in {country} based on the data
|
221 |
{row_str}
|
222 |
|
223 |
-
|
224 |
"""
|
225 |
|
226 |
# Generate the descriptive text using the model
|
|
|
206 |
|
207 |
# Create the prompt
|
208 |
prompt = f"""
|
209 |
+
Here is an example of summarizing adverse growth data:
|
210 |
+
|
211 |
+
Example for France:
|
212 |
+
Country: France
|
213 |
+
Adverse 2020: 0.643631
|
214 |
+
Adverse 2021: -0.493879
|
215 |
+
Adverse 2022: -0.785046
|
216 |
+
Adverse Cumulative: -0.639624
|
217 |
|
218 |
The theme is GDP.
|
219 |
+
Summary:
|
220 |
+
In the adverse scenario, the growth for GDP in France increased by 0.643631% in 2020 but decreased significantly by -0.493879% in 2021 and further decreased by -0.785046% in 2022, resulting in an adverse cumulative decrease of -0.639624%.
|
221 |
|
222 |
+
Now, summarize the adverse scenario growth for {theme} in {country} based on the following data:
|
223 |
{row_str}
|
224 |
|
225 |
+
Please ensure to follow this format and use the terms 'increase' or 'decrease' based on whether the values go up or down from the previous year. Explicitly mention if the growth increased or decreased compared to the previous year and include a cumulative result if applicable.
|
226 |
"""
|
227 |
|
228 |
# Generate the descriptive text using the model
|