This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import itertools | |
import os | |
import shutil | |
import tempfile | |
import argparse | |
import numpy as np | |
import torch | |
from tqdm import trange |
OlderNewer