DeDeckerThomas commited on
Commit
20b80b3
•
1 Parent(s): c84d6e6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -71,7 +71,7 @@ class KeyphraseGenerationPipeline(Text2TextGenerationPipeline):
71
  results = super().postprocess(
72
  model_outputs=model_outputs
73
  )
74
- return [result.strip() for result in results[0].get("generated_text").split(self.keyphrase_sep_token)]
75
  ```
76
 
77
  ```python
@@ -99,7 +99,7 @@ print(keyphrases)
99
 
100
  ```
101
  # Output
102
- ['keyphrase extraction', 'text analysis', 'artificial intelligence', 'classical machine learning', 'statistics']
103
  ```
104
 
105
  ## 📚 Training Dataset
 
71
  results = super().postprocess(
72
  model_outputs=model_outputs
73
  )
74
+ return [[keyphrase.strip() for keyphrase in result.get("generated_text").split(self.keyphrase_sep_token)] for result in results]
75
  ```
76
 
77
  ```python
 
99
 
100
  ```
101
  # Output
102
+ [['keyphrase extraction', 'text analysis', 'artificial intelligence', 'classical machine learning', 'statistics']]
103
  ```
104
 
105
  ## 📚 Training Dataset