Spaces:
Runtime error
Runtime error
| from abc import ABC, abstractmethod | |
| from dataclasses import dataclass | |
| import pandas as pd | |
| class DocumentsManager(ABC): | |
| def add(self, source: str, df: pd.DataFrame): | |
| """Write all documents from the dataframe into the db as a new version.""" | |
| ... | |
| def update_source(self, source: str, display_name: str = None, note: str = None): | |
| """Update the display name and/or note of a source. Also create the source if it does not exist.""" | |
| ... | |