Update pipeline.py
Browse files- pipeline.py +7 -1
pipeline.py
CHANGED
@@ -67,4 +67,10 @@ class PreTrainedPipeline():
|
|
67 |
return result
|
68 |
|
69 |
dec_input = tf.expand_dims([predicted_id], 0)
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
return result
|
68 |
|
69 |
dec_input = tf.expand_dims([predicted_id], 0)
|
70 |
+
resp = ""
|
71 |
+
for i in result:
|
72 |
+
if i!=1:
|
73 |
+
resp = resp + " " + result[i]
|
74 |
+
else:
|
75 |
+
resp += result[i]
|
76 |
+
return resp
|