naughtondale commited on
Commit
327cc32
·
1 Parent(s): 4a65842

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -14
app.py CHANGED
@@ -1,8 +1,8 @@
1
  import gradio as gr
2
  import interpreter
3
 
4
- interpreter.api_key = "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"
5
- interpreter.auto_run = True
6
 
7
  def chat(input):
8
  output = interpreter.chat(input)
@@ -10,18 +10,17 @@ def chat(input):
10
 
11
  def reset():
12
  interpreter.reset()
13
- return "Chat history reset"
14
 
15
- iface = gr.Interface(
16
- fn=chat,
17
- inputs="text",
18
- outputs="text",
19
- allow_screenshot=True,
20
- examples=[
21
- ["What is the capital of France?", "The capital of France is Paris."],
22
- ["What is 10 + 14?", "```python\nimport sympy as sym\nsym.solve(10 + 14)\n```\n24"]
23
- ]
24
- )
25
 
26
- iface.queue(reset, [], "button")
27
  iface.launch()
 
1
  import gradio as gr
2
  import interpreter
3
 
4
+ interpreter.api_key = "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"
5
+ interpreter.auto_run = True
6
 
7
  def chat(input):
8
  output = interpreter.chat(input)
 
10
 
11
  def reset():
12
  interpreter.reset()
13
+ return "Chat history reset"
14
 
15
+ iface = gr.Interface(fn=chat,
16
+ inputs="text",
17
+ outputs="text",
18
+ examples=[
19
+ ["What is the capital of France?", "Paris"],
20
+ ["What is 10 + 14?", "24"]
21
+ ]
22
+ )
23
+
24
+ iface.queue(reset, [], "button", concurrency_count=1)
25
 
 
26
  iface.launch()