Skip to content

Instantly share code, notes, and snippets.

Avatar

Shikib Mehri Shikib

View GitHub Profile
@Shikib
Shikib / fed_read.py
Created Oct 27, 2020
Script to generate FED scores (as used for DSTC9 Track 3).
View fed_read.py
import argparse
import json
import numpy as np
parser = argparse.ArgumentParser(description='Sub-task 2 FED Script')
parser.add_argument('--filename', type=str, default='fed_fine-tune-on-DialoGPT-M.json')
args = parser.parse_args()
@Shikib
Shikib / example.py
Created May 20, 2020
DialPort Example System API
View example.py
import tornado.ioloop
import tornado.web
import json
histories = {}
def reply(history):
return ' '.join(history[-1].split()[::-1])
class MainHandler(tornado.web.RequestHandler):
@Shikib
Shikib / score_sent.py
Last active May 6, 2020
FED metrics code
View score_sent.py
import os
import json
import numpy as np
import torch
from torch.utils.data import DataLoader, Dataset, SequentialSampler, RandomSampler
from torch.utils.data.distributed import DistributedSampler
import math
@Shikib
Shikib / captioning.ipynb
Last active Mar 22, 2018
Image captioning tutorial
View captioning.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.