Spaces:
Runtime error
Runtime error
Add SD
Browse files
app.py
CHANGED
@@ -21,7 +21,8 @@ datasets = {
|
|
21 |
}
|
22 |
|
23 |
external_datasets = {
|
24 |
-
"pip": load_dataset("open-source-metrics/pip-external").sort('day')
|
|
|
25 |
}
|
26 |
|
27 |
|
@@ -62,17 +63,17 @@ class RequestHandler(SimpleHTTPRequestHandler):
|
|
62 |
|
63 |
print("Initializing ...")
|
64 |
|
65 |
-
for k, v in dataset_keys.items():
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
|
72 |
for k, v in external_dataset_keys.items():
|
73 |
if len(v) < len(external_dataset_with_most_splits):
|
74 |
warnings.append(
|
75 |
-
f"The {k} dataset does not contain all splits. Missing: {external_dataset_with_most_splits - v}"
|
76 |
f".\nSelecting that split to show the pip install numbers will not work."
|
77 |
)
|
78 |
|
@@ -82,12 +83,10 @@ class RequestHandler(SimpleHTTPRequestHandler):
|
|
82 |
external_dataset_with_most_splits = list(external_dataset_with_most_splits)
|
83 |
external_dataset_with_most_splits.sort()
|
84 |
|
85 |
-
warnings.append("Selecting PyTorch and/or TensorFlow will take a while to compute, and may timeout for issues/PRs..")
|
86 |
-
|
87 |
res = {
|
88 |
'internal': dataset_with_most_splits,
|
89 |
'external': external_dataset_with_most_splits,
|
90 |
-
'warnings':
|
91 |
}
|
92 |
|
93 |
print(f"Returning: {res}")
|
|
|
21 |
}
|
22 |
|
23 |
external_datasets = {
|
24 |
+
"pip": load_dataset("open-source-metrics/pip-external").sort('day'),
|
25 |
+
"stars": load_dataset("open-source-metrics/stars-external")
|
26 |
}
|
27 |
|
28 |
|
|
|
63 |
|
64 |
print("Initializing ...")
|
65 |
|
66 |
+
# for k, v in dataset_keys.items():
|
67 |
+
# if len(v) < len(dataset_with_most_splits):
|
68 |
+
# warnings.append(
|
69 |
+
# f"The {k} dataset does not contain all splits. Missing: {dataset_with_most_splits - v}."
|
70 |
+
# f"\nSelecting that split to show the pip install numbers will not work."
|
71 |
+
# )
|
72 |
|
73 |
for k, v in external_dataset_keys.items():
|
74 |
if len(v) < len(external_dataset_with_most_splits):
|
75 |
warnings.append(
|
76 |
+
f"The {k} external dataset does not contain all splits. Missing: {external_dataset_with_most_splits - v}"
|
77 |
f".\nSelecting that split to show the pip install numbers will not work."
|
78 |
)
|
79 |
|
|
|
83 |
external_dataset_with_most_splits = list(external_dataset_with_most_splits)
|
84 |
external_dataset_with_most_splits.sort()
|
85 |
|
|
|
|
|
86 |
res = {
|
87 |
'internal': dataset_with_most_splits,
|
88 |
'external': external_dataset_with_most_splits,
|
89 |
+
'warnings': warnings
|
90 |
}
|
91 |
|
92 |
print(f"Returning: {res}")
|