Common pitfalls in cross-lingual generative AI include mistranslations, cultural biases, loss of nuance, and lack of context adaptation. Here is the code snippet you can refer to:

In the above code, we are using the following key points:
- Uses MarianMT for neural machine translation.
- Loads a pre-trained Helsinki-NLP model for English-to-French translation.
- Ensures input text is tokenized, padded, and truncated properly.
- Generates translated text using the model's decoder.
Hence, using a reliable translation model helps mitigate errors, but careful evaluation is required to address context, cultural nuances, and biases in cross-lingual AI.