bstraehle commited on
Commit
d7dab55
1 Parent(s): a2df0ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -11
app.py CHANGED
@@ -1,8 +1,7 @@
1
  # TODO:
2
  #
3
  # 1. Multi-user thread
4
- # 2. Tools: Code interpreter - https://platform.openai.com/docs/assistants/tools/code-interpreter - Matlplotlib chart
5
- # 3. Tools: Function calling - https://platform.openai.com/docs/assistants/tools/function-calling
6
 
7
  # Reference:
8
  #
@@ -152,7 +151,7 @@ def chat(message, history):
152
 
153
  run_steps = get_run_steps(client, thread, run)
154
 
155
- download_file = get_run_step_details(run_steps)
156
 
157
  messages = get_messages(client, thread)
158
 
@@ -160,13 +159,8 @@ def chat(message, history):
160
 
161
  download_link = ""
162
 
163
- print("###")
164
- print(text_values[0])
165
- print("###")
166
  if len(image_values) > 0:
167
- print(image_values[0])
168
- download_link = f"https://platform.openai.com/storage/files/{image_values[0]}"
169
- print("###")
170
 
171
  return f"{text_values[0]}{download_link}"
172
 
@@ -184,8 +178,8 @@ gr.ChatInterface(
184
  ["Explain: r\"^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[\\W]).{8,}$\""],
185
  ["Fix: x = [5, 2, 1, 3, 4]; print(x.sort())"],
186
  ["Optimize: x = []; for i in range(0, 10000): x.append(i)"],
187
- ["Execute: First 25 Fibbonaci numbers"],
188
- ["Execute: Chart showing stock gain YTD for NVDA, MSFT, AAPL, and GOOG, x-axis is 'Day' and y-axis is 'YTD Gain %'. Use mock data."]
189
  ],
190
  cache_examples=False,
191
  ).launch()
 
1
  # TODO:
2
  #
3
  # 1. Multi-user thread
4
+ # 2. Tools: Function calling - https://platform.openai.com/docs/assistants/tools/function-calling
 
5
 
6
  # Reference:
7
  #
 
151
 
152
  run_steps = get_run_steps(client, thread, run)
153
 
154
+ get_run_step_details(run_steps)
155
 
156
  messages = get_messages(client, thread)
157
 
 
159
 
160
  download_link = ""
161
 
 
 
 
162
  if len(image_values) > 0:
163
+ download_link = f"<br /><br />https://platform.openai.com/storage/files/{image_values[0]}"
 
 
164
 
165
  return f"{text_values[0]}{download_link}"
166
 
 
178
  ["Explain: r\"^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[\\W]).{8,}$\""],
179
  ["Fix: x = [5, 2, 1, 3, 4]; print(x.sort())"],
180
  ["Optimize: x = []; for i in range(0, 10000): x.append(i)"],
181
+ ["Generate and execute: First 25 Fibbonaci numbers"],
182
+ ["Generate and execute: Chart showing stock gain YTD for NVDA, MSFT, AAPL, and GOOG, x-axis is 'Day' and y-axis is 'YTD Gain %'. Use mock data."]
183
  ],
184
  cache_examples=False,
185
  ).launch()