pavvloff commited on
Commit
fe6de2a
1 Parent(s): e2383a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -38,14 +38,14 @@ examples = ['What is the capital of China?',
38
 
39
  def add_text(history, text):
40
  history = [] if history is None else history
41
- history = history + [(text, None)]
42
  return history, gr.Textbox(value="", interactive=False)
43
 
44
  def api_call(history, api_kind, table_name, openai_key, rerank):
45
  last = None
46
  for output in bot(history, api_kind, table_name, openai_key, rerank):
47
  last = output
48
- return str(last[0][0])
49
 
50
  def bot(history, api_kind, table_name, openai_key, rerank):
51
  top_k_rank = 4
 
38
 
39
  def add_text(history, text):
40
  history = [] if history is None else history
41
+ history.append((text, None))
42
  return history, gr.Textbox(value="", interactive=False)
43
 
44
  def api_call(history, api_kind, table_name, openai_key, rerank):
45
  last = None
46
  for output in bot(history, api_kind, table_name, openai_key, rerank):
47
  last = output
48
+ return str(last)
49
 
50
  def bot(history, api_kind, table_name, openai_key, rerank):
51
  top_k_rank = 4