bstraehle commited on
Commit
02adca0
1 Parent(s): a985e86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -26,11 +26,11 @@ def extract_content_value(data):
26
  content_values.append(content.text.value)
27
  return content_values
28
 
29
- def chat(message, history):
30
  assistant = client.beta.assistants.create(
31
- name="Math Tutor",
32
- instructions="You are a personal math tutor. Answer questions briefly, in a sentence or less.",
33
- model="gpt-4-1106-preview",
34
  )
35
 
36
  show_json(assistant)
@@ -76,4 +76,8 @@ gr.ChatInterface(
76
  retry_btn=None,
77
  undo_btn=None,
78
  clear_btn="Clear",
 
 
 
 
79
  ).launch()
 
26
  content_values.append(content.text.value)
27
  return content_values
28
 
29
+ def chat(message, history, system_prompt):
30
  assistant = client.beta.assistants.create(
31
+ name="Math Tutor",
32
+ instructions=system_prompt,
33
+ model="gpt-4-1106-preview",
34
  )
35
 
36
  show_json(assistant)
 
76
  retry_btn=None,
77
  undo_btn=None,
78
  clear_btn="Clear",
79
+ multimodal=True,
80
+ additional_inputs=[
81
+ gr.Textbox("You are a personal math tutor. Answer questions briefly, in a sentence or less.", label="System Prompt"),
82
+ ],
83
  ).launch()