bstraehle commited on
Commit
ce26b90
1 Parent(s): 0ee3feb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -65,7 +65,7 @@ def create_assistant(client):
65
  return assistant
66
 
67
  def load_assistant(client):
68
- ASSISTANT_ID = "asst_z9aCDk3Sp7yvWKRyLykbFIds"
69
 
70
  assistant = client.beta.assistants.retrieve(ASSISTANT_ID)
71
 
@@ -217,7 +217,7 @@ def chat(message, history):
217
  global client, assistant, thread
218
 
219
  if assistant == None:
220
- assistant = create_assistant(client)
221
 
222
  if thread == None or len(history) == 0:
223
  thread = create_thread(client)
@@ -270,7 +270,7 @@ gr.ChatInterface(
270
  ["Fix: x = [5, 2, 1, 3, 4]; print(x.sort())"],
271
  ["Optimize: x = []; for i in range(0, 10000): x.append(i)"],
272
  ["Execute: First 25 Fibbonaci numbers"],
273
- ["Get today's date, then generate a chart using stock data, showing YTD gain for NVDA, MSFT, AAPL, and GOOG, x-axis is 'Day' and y-axis is 'YTD Gain %'"]
274
  ],
275
  cache_examples=False,
276
  ).launch()
 
65
  return assistant
66
 
67
  def load_assistant(client):
68
+ ASSISTANT_ID = "asst_LLnivkXMNturcHtqI7YPGa7T"
69
 
70
  assistant = client.beta.assistants.retrieve(ASSISTANT_ID)
71
 
 
217
  global client, assistant, thread
218
 
219
  if assistant == None:
220
+ assistant = load_assistant(client)
221
 
222
  if thread == None or len(history) == 0:
223
  thread = create_thread(client)
 
270
  ["Fix: x = [5, 2, 1, 3, 4]; print(x.sort())"],
271
  ["Optimize: x = []; for i in range(0, 10000): x.append(i)"],
272
  ["Execute: First 25 Fibbonaci numbers"],
273
+ ["First get today's date, next get daily historic stock data for NVDA, MSFT, AAPL, and GOOG from beginning of the year until today, finally generate a chart showing YTD gain for each stock, x-axis is 'Day' and y-axis is 'YTD Gain %'"]
274
  ],
275
  cache_examples=False,
276
  ).launch()