BenBranyon commited on
Commit
59f98f1
·
verified ·
1 Parent(s): 08f3368

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -112,7 +112,14 @@ def generate(
112
  t.start()
113
 
114
  outputs = []
 
115
  for text in streamer:
 
 
 
 
 
 
116
  outputs.append(text)
117
  yield "".join(outputs)
118
 
 
112
  t.start()
113
 
114
  outputs = []
115
+ capture = False
116
  for text in streamer:
117
+ if not capture:
118
+ if "[" in text:
119
+ capture = True
120
+ text = text[text.index("["):] # Keep from first '[' onward
121
+ else:
122
+ continue # Skip until we find '['
123
  outputs.append(text)
124
  yield "".join(outputs)
125