File size: 430 Bytes
df1d12f
 
 
e4e1f70
df1d12f
e4e1f70
df1d12f
e4e1f70
df1d12f
 
e4e1f70
df1d12f
 
e4e1f70
 
df1d12f
e4e1f70
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from datasets import Dataset
from typing import Dict, List

_COLLAB: List[Dict] = []

def add_collaboration_note(document: str, note: str) -> Dict:
    record = {
        "document": document,
        "note": note
    }
    _COLLAB.append(record)
    return record

def get_collaboration_dataset() -> Dataset:
    if not _COLLAB:
        return Dataset.from_dict({"document": [], "note": []})
    return Dataset.from_list(_COLLAB)