Spaces:
Sleeping
Sleeping
kz209
commited on
Commit
•
3ccffef
1
Parent(s):
19083c7
update
Browse files- utils/multiple_stream.py +4 -4
utils/multiple_stream.py
CHANGED
@@ -28,10 +28,10 @@ def stream_data(content_list, model):
|
|
28 |
updated = False
|
29 |
#for i, content in enumerate(content_list):
|
30 |
try:
|
31 |
-
id,
|
32 |
-
|
33 |
-
|
34 |
-
outputs[id] += f" {
|
35 |
updated = True
|
36 |
except StopIteration:
|
37 |
pass
|
|
|
28 |
updated = False
|
29 |
#for i, content in enumerate(content_list):
|
30 |
try:
|
31 |
+
id, word = next(model.gen(content_list, streaming=True)) # Wrap content in a list to match expected input type
|
32 |
+
print(outputs)
|
33 |
+
print(id, word)
|
34 |
+
outputs[id] += f" {word}"
|
35 |
updated = True
|
36 |
except StopIteration:
|
37 |
pass
|