Skip to content

Instantly share code, notes, and snippets.

View Mario-RC's full-sized avatar
🤖

Mario Rodríguez-Cantelar Mario-RC

🤖
View GitHub Profile
@thomwolf
thomwolf / persona-chat.py
Last active February 28, 2023 07:25
Download and load persona-chat json dataset
import json
from pytorch_pretrained_bert import cached_path
url = "https://s3.amazonaws.com/datasets.huggingface.co/personachat/personachat_self_original.json"
# Download and load JSON dataset
personachat_file = cached_path(url)
with open(personachat_file, "r", encoding="utf-8") as f:
dataset = json.loads(f.read())