Skip to content

Commit a1f1845

Browse files
ahmedabu98aIbrahiim
authored andcommitted
fix key error for huggingface notebook (apache#37435)
1 parent e80b6c5 commit a1f1845

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/notebooks/beam-ml/run_inference_huggingface.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
" \"\"\"\n",
238238
" def process(self, element):\n",
239239
" example = element.example\n",
240-
" translated_text = element.inference[0]['translation_text']\n",
240+
" translated_text = element.inference['translation_text']\n",
241241
" print(f'Example: {example}')\n",
242242
" print(f'Translated text: {translated_text}')\n",
243243
" print('-' * 80)\n"

0 commit comments

Comments
 (0)