Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
211 |
-
|
212 |
-
Adverse
|
213 |
-
Adverse
|
214 |
-
Adverse 2022 -1.195906
|
215 |
-
Adverse Cumulative -3.573762
|
216 |
|
217 |
-
The theme is GDP
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
Here is another table:
|
223 |
{row_str}
|
224 |
-
|
225 |
-
The theme is {theme}
|
226 |
|
227 |
-
|
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
|