hysts HF staff commited on
Commit
41ebd25
1 Parent(s): 826e03f
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -94,7 +94,7 @@ def chat(
94
  repetition_penalty: float,
95
  history_orig: list[str] = [],
96
  history_qa: list[str] = [],
97
- ) -> tuple[dict[str, list[str]], dict[str, list[str]], dict[str, list[str]]]:
98
  history_orig.append(text)
99
  text_qa = f"Question: {text} Answer:"
100
  history_qa.append(text_qa)
@@ -113,7 +113,7 @@ def chat(
113
  history_qa.append(output)
114
 
115
  chat_val = list(zip(history_orig[0::2], history_orig[1::2]))
116
- return gr.update(value=chat_val), gr.update(value=history_orig), gr.update(value=history_qa)
117
 
118
 
119
  examples = [
 
94
  repetition_penalty: float,
95
  history_orig: list[str] = [],
96
  history_qa: list[str] = [],
97
+ ) -> tuple[list[tuple[str, str]], list[str], list[str]]:
98
  history_orig.append(text)
99
  text_qa = f"Question: {text} Answer:"
100
  history_qa.append(text_qa)
 
113
  history_qa.append(output)
114
 
115
  chat_val = list(zip(history_orig[0::2], history_orig[1::2]))
116
+ return chat_val, history_orig, history_qa
117
 
118
 
119
  examples = [