Spaces:
Sleeping
Sleeping
Update stories.py
Browse files- stories.py +3 -2
stories.py
CHANGED
|
@@ -269,10 +269,11 @@ def generate_story_from_dataframe(df, story_type):
|
|
| 269 |
story_prompt +
|
| 270 |
"Write a story for a narrator meaning no labels of pages or sections the story should just flow. Divide your story into exactly 5 short and concise sections separated by [break]. " +
|
| 271 |
"For each section, provide a brief narrative analysis and include, within angle brackets <>, a clear and plain-text description of a chart visualization that would represent the data. " +
|
| 272 |
-
"Limit the descriptions by specifying only charts. "
|
|
|
|
| 273 |
|
| 274 |
)
|
| 275 |
-
#
|
| 276 |
try:
|
| 277 |
response = model.generate_content(full_prompt)
|
| 278 |
if not response or not response.text:
|
|
|
|
| 269 |
story_prompt +
|
| 270 |
"Write a story for a narrator meaning no labels of pages or sections the story should just flow. Divide your story into exactly 5 short and concise sections separated by [break]. " +
|
| 271 |
"For each section, provide a brief narrative analysis and include, within angle brackets <>, a clear and plain-text description of a chart visualization that would represent the data. " +
|
| 272 |
+
"Limit the descriptions by specifying only charts. " +
|
| 273 |
+
"Ensure that your response contains only natural language descriptions examples: 'bar chart of', 'pie chart of' , 'histogram of', 'scatterplot of', 'boxplot of' , 'heatmap of etc' and nothing else."
|
| 274 |
|
| 275 |
)
|
| 276 |
+
#
|
| 277 |
try:
|
| 278 |
response = model.generate_content(full_prompt)
|
| 279 |
if not response or not response.text:
|