Hazzzardous commited on
Commit
d903d0d
·
1 Parent(s): f27b8ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -14,9 +14,7 @@ def predict(input, history=None):
14
  model.setState(history)
15
  model.loadContext(newctx=f"{input}\n\nBot: ")
16
  r = model.forward(number=100,stopStrings=["User: "])
17
- rr = r["output"].split("<|endoftext|>")
18
- rr = [(rr[i], rr[i+1]) for i in range(0, len(rr)-1, 2)] # convert to tuples of list
19
-
20
  return rr, r["state"]
21
 
22
  with gr.Blocks() as demo:
 
14
  model.setState(history)
15
  model.loadContext(newctx=f"{input}\n\nBot: ")
16
  r = model.forward(number=100,stopStrings=["User: "])
17
+ rr = [(input,r["output"])]
 
 
18
  return rr, r["state"]
19
 
20
  with gr.Blocks() as demo: