Omnibus commited on
Commit
986e57c
1 Parent(s): a1d3e5f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -63,6 +63,20 @@ def generate(
63
  for response in stream:
64
  output += response.token.text
65
  yield output
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  return output
67
 
68
 
 
63
  for response in stream:
64
  output += response.token.text
65
  yield output
66
+
67
+ lines = output.strip().strip("\n").split("\n")
68
+ #history=""
69
+ for i,line in enumerate(lines):
70
+ if line.startswith("1. "):
71
+ print(line)
72
+ if line.startswith("2. "):
73
+ print(line)
74
+ if line.startswith("3. "):
75
+ print(line)
76
+ if line.startswith("4. "):
77
+ print(line)
78
+ if line.startswith("5. "):
79
+ print(line)
80
  return output
81
 
82