Skip to content

Instantly share code, notes, and snippets.

View seanbenhur's full-sized avatar
🚀
Teaching machines to learn!!

Sean Benhur seanbenhur

🚀
Teaching machines to learn!!
View GitHub Profile
import pandas as pd
from easynmt import EasyNMT
#read csv
split_0 = pd.read_csv("/content/drive/MyDrive/datasets/Image-Captioning-ACL/splits_0")
#turn that into list
split_0_captions = split_0['caption'].tolist()
#load the mbart50 english to many model
model = EasyNMT('mbart50_en2m')
import random
import itertools
import os
import shutil
import tempfile
import argparse
import numpy as np
import torch
from tqdm import trange