Spaces:
Runtime error
Runtime error
neindochoh
commited on
Commit
•
b381f58
1
Parent(s):
4ecf1c3
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
emoji: 🔬
|
4 |
colorFrom: indigo
|
5 |
colorTo: green
|
|
|
1 |
---
|
2 |
+
# title:
|
3 |
emoji: 🔬
|
4 |
colorFrom: indigo
|
5 |
colorTo: green
|
run.py
CHANGED
@@ -91,6 +91,23 @@ if __name__ == "__main__":
|
|
91 |
if "embedding" in col and isinstance(ds.features[col], datasets.Sequence):
|
92 |
dtypes[col] = spotlight.dtypes.embedding_dtype
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
if not isinstance(ds, datasets.Dataset):
|
95 |
raise TypeError(
|
96 |
f"Loaded Hugging Face dataset is of type {type(ds)} instead of "
|
@@ -99,5 +116,12 @@ if __name__ == "__main__":
|
|
99 |
)
|
100 |
print(f"Serving Hugging Face dataset {hf_settings}.")
|
101 |
spotlight.show(
|
102 |
-
ds,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
)
|
|
|
91 |
if "embedding" in col and isinstance(ds.features[col], datasets.Sequence):
|
92 |
dtypes[col] = spotlight.dtypes.embedding_dtype
|
93 |
|
94 |
+
layout = spotlight.layout.split(
|
95 |
+
spotlight.layout.split(
|
96 |
+
spotlight.layout.tab(spotlight.layout.table(), weight=4),
|
97 |
+
spotlight.layout.tab(
|
98 |
+
spotlight.layout.similaritymap(),
|
99 |
+
spotlight.layout.scatterplot(),
|
100 |
+
weight=3,
|
101 |
+
),
|
102 |
+
spotlight.layout.tab(
|
103 |
+
spotlight.layout.histogram(), spotlight.layout.metric(), weight=3
|
104 |
+
),
|
105 |
+
weight=5,
|
106 |
+
),
|
107 |
+
spotlight.layout.tab(spotlight.layout.inspector(), weight=3),
|
108 |
+
orientation="vertical",
|
109 |
+
)
|
110 |
+
|
111 |
if not isinstance(ds, datasets.Dataset):
|
112 |
raise TypeError(
|
113 |
f"Loaded Hugging Face dataset is of type {type(ds)} instead of "
|
|
|
116 |
)
|
117 |
print(f"Serving Hugging Face dataset {hf_settings}.")
|
118 |
spotlight.show(
|
119 |
+
ds,
|
120 |
+
host="0.0.0.0",
|
121 |
+
port=7860,
|
122 |
+
wait="forever",
|
123 |
+
dtype=dtypes,
|
124 |
+
layout=layout,
|
125 |
+
analyze=True,
|
126 |
+
no_browser=True,
|
127 |
)
|