Omnibus commited on
Commit
b441e99
1 Parent(s): 9fad852

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -40,14 +40,9 @@ def chat_inf(system_prompt,prompt,history):
40
 
41
  for response in stream:
42
  output += response.token.text
43
- if history:
44
- hist=[history[:hist_len],(prompt,output)]
45
- #hist=[history,(prompt,output)]
46
- else:
47
- hist=[(prompt,output)]
48
- yield hist
49
-
50
-
51
 
52
  def get_screenshot(chat: list,height=5000,width=600,chatblock=[1],theme="light",wait=3000,header=True):
53
  result = ss_client.predict(str(chat),height,width,[chatblock],header,theme,wait,api_name="/run_script")
 
40
 
41
  for response in stream:
42
  output += response.token.text
43
+ yield [(prompt,output)]
44
+ history.append(prompt,output)
45
+ yield history
 
 
 
 
 
46
 
47
  def get_screenshot(chat: list,height=5000,width=600,chatblock=[1],theme="light",wait=3000,header=True):
48
  result = ss_client.predict(str(chat),height,width,[chatblock],header,theme,wait,api_name="/run_script")