bstraehle commited on
Commit
0784f56
·
verified ·
1 Parent(s): 3366e8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -27,7 +27,11 @@ def create_assistant(client):
27
  return assistant
28
 
29
  def load_assistant():
30
- return "TODO"
 
 
 
 
31
 
32
  def create_thread(client):
33
  thread = client.beta.threads.create()
@@ -132,7 +136,7 @@ def chat(message, history):
132
 
133
  gr.ChatInterface(
134
  fn=chat,
135
- chatbot=gr.Chatbot(height=500),
136
  textbox=gr.Textbox(placeholder="Ask anything", container=False, scale=7),
137
  title="Python Code Generator",
138
  description="The assistant can generate, explain, fix, optimize, document, test, and generally help with code. It can also execute code.",
 
27
  return assistant
28
 
29
  def load_assistant():
30
+ assistant = client.beta.assistants.retrieve("asst_abc123")
31
+
32
+ show_json("assistant", assistant)
33
+
34
+ return assistant
35
 
36
  def create_thread(client):
37
  thread = client.beta.threads.create()
 
136
 
137
  gr.ChatInterface(
138
  fn=chat,
139
+ chatbot=gr.Chatbot(height=400),
140
  textbox=gr.Textbox(placeholder="Ask anything", container=False, scale=7),
141
  title="Python Code Generator",
142
  description="The assistant can generate, explain, fix, optimize, document, test, and generally help with code. It can also execute code.",