petrified commited on
Commit
735c827
·
verified ·
1 Parent(s): 81a7385

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 give me the most related and useful possible question to get simple but useful insights for {question}."
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 60 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}")
 
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}")