bstraehle commited on
Commit
f60e752
·
verified ·
1 Parent(s): 1b1181f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -191,12 +191,13 @@ def chat(message, history):
191
 
192
  run_steps = get_run_steps(client, thread, run)
193
 
194
- results = get_run_step_details(run_steps)
195
 
196
  ###
197
- if len(results) > 0 :
198
- print("## results[0]")
199
- print(results[0])
 
200
  create_message(client, thread, results[0] + " " + message)
201
  run = create_run(client, assistant, thread)
202
  run = wait_on_run(client, thread, run)
@@ -230,7 +231,7 @@ gr.ChatInterface(
230
  ["Fix: x = [5, 2, 1, 3, 4]; print(x.sort())"],
231
  ["Optimize: x = []; for i in range(0, 10000): x.append(i)"],
232
  ["Execute: First 25 Fibbonaci numbers"],
233
- ["Execute using mock data: Chart showing stock gain YTD for NVDA, MSFT, AAPL, and GOOG, x-axis is 'Day' and y-axis is 'YTD Gain %'"]
234
  ],
235
  cache_examples=False,
236
  ).launch()
 
191
 
192
  run_steps = get_run_steps(client, thread, run)
193
 
194
+ result = get_run_step_details(run_steps)
195
 
196
  ###
197
+ if result:
198
+ print("## result")
199
+ print(result)
200
+ thread = create_thread(client)
201
  create_message(client, thread, results[0] + " " + message)
202
  run = create_run(client, assistant, thread)
203
  run = wait_on_run(client, thread, run)
 
231
  ["Fix: x = [5, 2, 1, 3, 4]; print(x.sort())"],
232
  ["Optimize: x = []; for i in range(0, 10000): x.append(i)"],
233
  ["Execute: First 25 Fibbonaci numbers"],
234
+ ["Get today's date, then generate a chart using mock data, showing stock gain YTD for NVDA, MSFT, AAPL, and GOOG, x-axis is 'Day' and y-axis is 'YTD Gain %'"]
235
  ],
236
  cache_examples=False,
237
  ).launch()