merve HF staff commited on
Commit
a060dc5
1 Parent(s): 3a8387b

Update pipeline.py

Browse files
Files changed (1) hide show
  1. 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
- return result
 
 
 
 
 
 
 
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