Spaces:
Sleeping
Sleeping
JasonTPhillipsJr
commited on
Commit
•
564da7a
1
Parent(s):
169e7aa
Update app.py
Browse files
app.py
CHANGED
@@ -84,9 +84,11 @@ def process_entity(batch, model, device):
|
|
84 |
return embedding.cpu().numpy(), input_ids.cpu().numpy()
|
85 |
|
86 |
all_embeddings = []
|
87 |
-
for batch in (data_loader):
|
88 |
-
|
89 |
-
|
|
|
|
|
90 |
|
91 |
st.write("SpaBERT Embedding shape:", all_embeddings[0].shape)
|
92 |
st.write("SpaBERT Embedding:", all_embeddings[0])
|
|
|
84 |
return embedding.cpu().numpy(), input_ids.cpu().numpy()
|
85 |
|
86 |
all_embeddings = []
|
87 |
+
for i, batch in enumerate(data_loader):
|
88 |
+
if i >= 2: # Stop after processing 3 batches
|
89 |
+
break
|
90 |
+
embeddings, input_ids = process_entity(batch, spaBERT_model, device)
|
91 |
+
all_embeddings.append(embeddings)
|
92 |
|
93 |
st.write("SpaBERT Embedding shape:", all_embeddings[0].shape)
|
94 |
st.write("SpaBERT Embedding:", all_embeddings[0])
|