Jin Ziqi commited on
Commit
74ec24f
·
1 Parent(s): 591d766

update the interface

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -20,7 +20,7 @@ import sys
20
 
21
  openai.api_key = os.getenv("api_key")
22
 
23
- def greet(question="Xiaoming have 3 apples and he eats 1. After that he share half of them to Mei. How many apples he left?"):
24
  input = question + '\n\n' + "|step|subquestion|process|result|"
25
  response = openai.ChatCompletion.create(
26
  model="gpt-3.5-turbo",
@@ -34,6 +34,11 @@ def greet(question="Xiaoming have 3 apples and he eats 1. After that he share ha
34
  return "|step|subquestion|process|result|\n" + response
35
 
36
 
37
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
 
 
 
 
 
38
  iface.launch()
39
 
 
20
 
21
  openai.api_key = os.getenv("api_key")
22
 
23
+ def greet(question):
24
  input = question + '\n\n' + "|step|subquestion|process|result|"
25
  response = openai.ChatCompletion.create(
26
  model="gpt-3.5-turbo",
 
34
  return "|step|subquestion|process|result|\n" + response
35
 
36
 
37
+ iface = gr.Interface(
38
+ fn=greet,
39
+ inputs="text",
40
+ outputs="text",
41
+ title="Tab-CoT: Zero-Shot Tabular Chain-of-Thought",
42
+ examples="Tommy is fundraising for his charity by selling brownies for $3 a slice and cheesecakes for $4 a slice. If Tommy sells 43 brownies and 23 slices of cheesecake, how much money does Tommy raise?")
43
  iface.launch()
44