Spaces:
Runtime error
Runtime error
librarian-bot
commited on
Commit
·
495282b
1
Parent(s):
8ba364d
Update main.py
Browse files
main.py
CHANGED
@@ -9,7 +9,6 @@ from huggingface_hub import (DatasetCard, HfApi, ModelCard, comment_discussion,
|
|
9 |
get_repo_discussions, login)
|
10 |
from huggingface_hub.utils import EntryNotFoundError
|
11 |
from tabulate import tabulate
|
12 |
-
from toolz import valmap
|
13 |
|
14 |
KEY = os.environ.get("WEBHOOK_SECRET")
|
15 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
@@ -55,7 +54,7 @@ def create_metadata_key_dict(card_data, repo_type: str):
|
|
55 |
|
56 |
|
57 |
def create_metadata_breakdown_table(desired_metadata_dictionary):
|
58 |
-
data =
|
59 |
metadata_fields_column = list(data.keys())
|
60 |
metadata_values_column = list(data.values())
|
61 |
table_data = list(zip(metadata_fields_column, metadata_values_column))
|
|
|
9 |
get_repo_discussions, login)
|
10 |
from huggingface_hub.utils import EntryNotFoundError
|
11 |
from tabulate import tabulate
|
|
|
12 |
|
13 |
KEY = os.environ.get("WEBHOOK_SECRET")
|
14 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
|
|
54 |
|
55 |
|
56 |
def create_metadata_breakdown_table(desired_metadata_dictionary):
|
57 |
+
data = {k:v or "Field Missing" for k,v in desired_metadata_dictionary.items()}
|
58 |
metadata_fields_column = list(data.keys())
|
59 |
metadata_values_column = list(data.values())
|
60 |
table_data = list(zip(metadata_fields_column, metadata_values_column))
|