bstraehle commited on
Commit
d92a321
1 Parent(s): 78a42dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -33,7 +33,7 @@ def create_assistant(client):
33
 
34
  return assistant
35
 
36
- def load_assistant():
37
  assistant = client.beta.assistants.retrieve("asst_rA2o181bBD633oWoaiImdzwG")
38
 
39
  show_json("assistant", assistant)
@@ -143,7 +143,7 @@ def chat(message, history):
143
 
144
  gr.ChatInterface(
145
  fn=chat,
146
- chatbot=gr.Chatbot(height=400),
147
  textbox=gr.Textbox(placeholder="Ask anything", container=False, scale=7),
148
  title="Python Code Generator",
149
  description="The assistant can generate, explain, fix, optimize, document, test, and generally help with code. It can also execute code.",
@@ -155,8 +155,8 @@ gr.ChatInterface(
155
  ["Explain: r'^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[\\W]).{8,}$'"],
156
  ["Fix: x = [5, 2, 1, 3, 4]; print(x.sort())"],
157
  ["Optimize: x = []; for i in range(0, 10000): x.append(i)"],
158
- ["Execute: Code to generate the first 20 fibbonaci numbers"],
159
- [f"Today is {datetime.date.today()}. Create a plot showing stock gain YTD for NVDA, MSFT, AAPL, and GOOG, x-axis is 'Day' and y-axis is 'YTD Gain %'. Return the result, don't persist to storage."],
160
  ],
161
  cache_examples=False,
162
  ).launch()
 
33
 
34
  return assistant
35
 
36
+ def load_assistant(client):
37
  assistant = client.beta.assistants.retrieve("asst_rA2o181bBD633oWoaiImdzwG")
38
 
39
  show_json("assistant", assistant)
 
143
 
144
  gr.ChatInterface(
145
  fn=chat,
146
+ chatbot=gr.Chatbot(height=350),
147
  textbox=gr.Textbox(placeholder="Ask anything", container=False, scale=7),
148
  title="Python Code Generator",
149
  description="The assistant can generate, explain, fix, optimize, document, test, and generally help with code. It can also execute code.",
 
155
  ["Explain: r'^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[\\W]).{8,}$'"],
156
  ["Fix: x = [5, 2, 1, 3, 4]; print(x.sort())"],
157
  ["Optimize: x = []; for i in range(0, 10000): x.append(i)"],
158
+ ["Generate and run: Print the first 20 fibbonaci numbers"],
159
+ [f"Execute: Today is {datetime.date.today()}. Create a plot showing stock gain YTD for NVDA, MSFT, AAPL, and GOOG, x-axis is 'Day' and y-axis is 'YTD Gain %'. Return the result, don't persist to storage."],
160
  ],
161
  cache_examples=False,
162
  ).launch()