Spaces:
Running
on
Zero
Running
on
Zero
frankaging
commited on
Commit
·
7f3db95
1
Parent(s):
1644e6b
o1 impl
Browse files
app.py
CHANGED
@@ -61,7 +61,13 @@ if torch.cuda.is_available():
|
|
61 |
md = load_jsonl(meta_path)
|
62 |
|
63 |
concept_list = [item["concept"] for item in md]
|
64 |
-
concept_id_map = {
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
steer = Steer(embed_dim=params.shape[0], latent_dim=params.shape[1])
|
67 |
steer.proj.weight.data = params.float()
|
|
|
61 |
md = load_jsonl(meta_path)
|
62 |
|
63 |
concept_list = [item["concept"] for item in md]
|
64 |
+
concept_id_map = {}
|
65 |
+
|
66 |
+
# the reason to reindex is because there is one concept that is missing.
|
67 |
+
concept_reindex = 0
|
68 |
+
for item in md:
|
69 |
+
concept_id_map[item["concept"]] = concept_reindex
|
70 |
+
concept_reindex += 1
|
71 |
|
72 |
steer = Steer(embed_dim=params.shape[0], latent_dim=params.shape[1])
|
73 |
steer.proj.weight.data = params.float()
|