Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -243,7 +243,8 @@ def generate_text(df, country, theme):
|
|
| 243 |
Now, using the following data for {theme} in {country}, describe the adverse growth:
|
| 244 |
{row_str}
|
| 245 |
Topic: {theme}
|
| 246 |
-
|
|
|
|
| 247 |
"""
|
| 248 |
prompt1 = f"""
|
| 249 |
Here is an example of how to describe adverse growth data for a given country:
|
|
@@ -271,7 +272,7 @@ def generate_text(df, country, theme):
|
|
| 271 |
"""
|
| 272 |
|
| 273 |
# Generate the descriptive text using the model
|
| 274 |
-
result = table_to_text(prompt, max_length=248
|
| 275 |
|
| 276 |
return result
|
| 277 |
# Global variable
|
|
|
|
| 243 |
Now, using the following data for {theme} in {country}, describe the adverse growth:
|
| 244 |
{row_str}
|
| 245 |
Topic: {theme}
|
| 246 |
+
|
| 247 |
+
Describe by highlighting changes between those three years. Accurately describe whether the values increase or decrease, whether it worsened or improved and reflect the data as it appears.
|
| 248 |
"""
|
| 249 |
prompt1 = f"""
|
| 250 |
Here is an example of how to describe adverse growth data for a given country:
|
|
|
|
| 272 |
"""
|
| 273 |
|
| 274 |
# Generate the descriptive text using the model
|
| 275 |
+
result = table_to_text(prompt, max_length=248)[0]['generated_text']
|
| 276 |
|
| 277 |
return result
|
| 278 |
# Global variable
|