Spaces:
Paused
Paused
fix docid formatting
Browse files
app.py
CHANGED
@@ -20,22 +20,30 @@ def get_docid_html(docid):
|
|
20 |
data_org, dataset, docid = docid.split("/")
|
21 |
metadata = roots_datasets[dataset]
|
22 |
if metadata.private:
|
23 |
-
docid_html =
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
30 |
)
|
31 |
else:
|
32 |
-
docid_html =
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
39 |
)
|
40 |
return docid_html
|
41 |
|
|
|
20 |
data_org, dataset, docid = docid.split("/")
|
21 |
metadata = roots_datasets[dataset]
|
22 |
if metadata.private:
|
23 |
+
docid_html = """
|
24 |
+
<a title="This dataset is private. See the introductory text for more information"
|
25 |
+
style="color:#AA4A44; font-weight: bold; text-decoration:none"
|
26 |
+
onmouseover="style='color:#AA4A44; font-weight: bold; text-decoration:underline'"
|
27 |
+
onmouseout="style='color:#AA4A44; font-weight: bold; text-decoration:none'"
|
28 |
+
href="https://huggingface.co/datasets/bigscience-data/{dataset}"
|
29 |
+
target="_blank">
|
30 |
+
π{dataset}
|
31 |
+
</a>
|
32 |
+
<span style="color:#7978FF; ">/{docid}</span>""".format(
|
33 |
+
dataset=dataset, docid=docid
|
34 |
)
|
35 |
else:
|
36 |
+
docid_html = """
|
37 |
+
<a title="This dataset is licensed {metadata}"
|
38 |
+
style="color:#7978FF; font-weight: bold; text-decoration:none"
|
39 |
+
onmouseover="style='color:#7978FF; font-weight: bold; text-decoration:underline'"
|
40 |
+
onmouseout="style='color:#7978FF; font-weight: bold; text-decoration:none'"
|
41 |
+
href="https://huggingface.co/datasets/bigscience-data/{dataset}"
|
42 |
+
target="_blank">
|
43 |
+
{dataset}
|
44 |
+
</a>
|
45 |
+
<span style="color:#7978FF; ">/{docid}</span>""".format(
|
46 |
+
metadata=metadata.tags[0].split(":")[-1], dataset=dataset, docid=docid
|
47 |
)
|
48 |
return docid_html
|
49 |
|