GodsDevProject's picture
Update collaboration.py
e4e1f70 verified
raw
history blame contribute delete
430 Bytes
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)