Omnibus commited on
Commit
622af1a
·
verified ·
1 Parent(s): aa61ed6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -34,9 +34,13 @@ def chat_inf(system_prompt,prompt,history):
34
  formatted_prompt = format_prompt(f"{system_prompt}, {prompt}", history)
35
  stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
36
  output = ""
 
37
  for response in stream:
38
  output += response.token.text
39
- hist=[history,[prompt,output]]
 
 
 
40
  yield hist
41
 
42
 
 
34
  formatted_prompt = format_prompt(f"{system_prompt}, {prompt}", history)
35
  stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
36
  output = ""
37
+
38
  for response in stream:
39
  output += response.token.text
40
+ if history:
41
+ hist=[history,(prompt,output)]
42
+ else:
43
+ hist=[(prompt,output)]
44
  yield hist
45
 
46