import pickle
import random
from googletrans import Translator
f = open('./data/happy_episodes_add_image_url_list.bin', 'rb')
happy_episodes = pickle.load(f)
f.close()
translator = Translator()
happy_episode = random.choice(happy_episodes)
trans_en = translator.detect(happy_episode['content'])
print(type(trans_en))
print(trans_en.lang)

984f4a5d860c3144f711769243d5a34e0c4ab000
<mask token>

<mask token>
f.close()
<mask token>
print(type(trans_en))
print(trans_en.lang)

<mask token>
f = open('./data/happy_episodes_add_image_url_list.bin', 'rb')
happy_episodes = pickle.load(f)
f.close()
translator = Translator()
happy_episode = random.choice(happy_episodes)
trans_en = translator.detect(happy_episode['content'])
print(type(trans_en))
print(trans_en.lang)

import pickle
import random
from googletrans import Translator
f = open('./data/happy_episodes_add_image_url_list.bin', 'rb')
happy_episodes = pickle.load(f)
f.close()
translator = Translator()
happy_episode = random.choice(happy_episodes)
trans_en = translator.detect(happy_episode['content'])
print(type(trans_en))
print(trans_en.lang)
