A deep learning system for demographic inference (gender, age, and individual/person) that was trained on massive Twitter dataset using profile images, screen names, names, and biographies
Added more exceptions in preprocess.py to handle urllib remaining errors like ContentTooShortError, which occurred while I was fetching profile images from Twitter.
The same goes for ValueError, which I have encountered when the field profile_image_url_https in the twitter json was empty (i.e. "")
At last, I have added a line in m3twitter.py to verify if the profile image was successfully downloaded: if that's not the case, TW_DEFAULT_PROFILE_IMG is used to avoid crash during the infer phase.
Added more exceptions in preprocess.py to handle
urllib
remaining errors likeContentTooShortError
, which occurred while I was fetching profile images from Twitter.The same goes for
ValueError
, which I have encountered when the fieldprofile_image_url_https
in the twitter json was empty (i.e. "")At last, I have added a line in m3twitter.py to verify if the profile image was successfully downloaded: if that's not the case,
TW_DEFAULT_PROFILE_IMG
is used to avoid crash during the infer phase.