Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -170,7 +170,7 @@ def random_response(message):
|
|
| 170 |
|
| 171 |
str_summary = str(summary)
|
| 172 |
prompt = ChatPromptTemplate.from_template("Based on the data below:{str_summary},"
|
| 173 |
-
"please
|
| 174 |
"Your insight will be used to guide the graph generation by python using ploty, so make it simple and easier to process data."
|
| 175 |
"For example: 'Goal(question='What are the sales trends by product category?visualization='bar chart of prod_category against sum(trxn_item_qty) grouped by trxn_date'."
|
| 176 |
"If the data columns is empty, please ignore the column."
|
|
@@ -193,7 +193,7 @@ def random_response(message):
|
|
| 193 |
|
| 194 |
|
| 195 |
try:
|
| 196 |
-
temp_chart = lida.visualize(summary=summary, goal=insights[0]+'Graph heigh 800,width 1000.If multipul data shows,Only show the top 5 or 10 datas.If there is statement in previous question using monthly data,other time related using daily.set different color to the graph,x label rotate
|
| 197 |
print(f'*'*50)
|
| 198 |
code = temp_chart[0].code
|
| 199 |
print(f"{code}")
|
|
|
|
| 170 |
|
| 171 |
str_summary = str(summary)
|
| 172 |
prompt = ChatPromptTemplate.from_template("Based on the data below:{str_summary},"
|
| 173 |
+
"please help me adjust the question: {question} with the way that can visualize."
|
| 174 |
"Your insight will be used to guide the graph generation by python using ploty, so make it simple and easier to process data."
|
| 175 |
"For example: 'Goal(question='What are the sales trends by product category?visualization='bar chart of prod_category against sum(trxn_item_qty) grouped by trxn_date'."
|
| 176 |
"If the data columns is empty, please ignore the column."
|
|
|
|
| 193 |
|
| 194 |
|
| 195 |
try:
|
| 196 |
+
temp_chart = lida.visualize(summary=summary, goal=insights[0]+'Graph heigh 800,width 1000.If multipul data shows,Only show the top 5 or 10 datas.If there is statement in previous question using monthly data,other time related using daily.set different color to the graph,x label rotate 45 degree,do not use the guide line', textgen_config=text_gen_config,library='matplotlib')
|
| 197 |
print(f'*'*50)
|
| 198 |
code = temp_chart[0].code
|
| 199 |
print(f"{code}")
|