coeuslearning
commited on
Commit
•
671de50
1
Parent(s):
82c6071
Update app.py
Browse files
app.py
CHANGED
@@ -68,11 +68,13 @@ def generate(
|
|
68 |
t = Thread(target=model.generate, kwargs=generate_kwargs)
|
69 |
t.start()
|
70 |
|
71 |
-
outputs = []
|
72 |
-
for text in streamer:
|
73 |
-
outputs.append(text)
|
74 |
-
concatenated_outputs = " ".join(outputs)
|
75 |
# yield concatenated_outputs
|
|
|
|
|
76 |
|
77 |
# Mask the output here
|
78 |
masked_output = mask_with_protecto(concatenated_outputs)
|
|
|
68 |
t = Thread(target=model.generate, kwargs=generate_kwargs)
|
69 |
t.start()
|
70 |
|
71 |
+
# outputs = []
|
72 |
+
# for text in streamer:
|
73 |
+
# outputs.append(text)
|
74 |
+
# concatenated_outputs = " ".join(outputs)
|
75 |
# yield concatenated_outputs
|
76 |
+
concatenated_outputs = " ".join([text for text in streamer])
|
77 |
+
# yield concatenated_outputs
|
78 |
|
79 |
# Mask the output here
|
80 |
masked_output = mask_with_protecto(concatenated_outputs)
|