Spaces:
Runtime error
Runtime error
hacpdsae2023
commited on
Commit
·
d1cba40
1
Parent(s):
da97d65
Create Graph from cosine similarity
Browse filesTest nx.from_numpy_array; we might need to convert from tensor to numpy
app.py
CHANGED
@@ -25,6 +25,8 @@ for i in range(len(sentences)):
|
|
25 |
for j in range(i):
|
26 |
st.write("{} \t\t {} \t\t Score: {:.4f}".format(sentences[i], sentences[j], cosine_scores[i][j]))
|
27 |
|
|
|
|
|
28 |
|
29 |
#-------------------------------------------------------------
|
30 |
#-------------------------------------------------------------
|
|
|
25 |
for j in range(i):
|
26 |
st.write("{} \t\t {} \t\t Score: {:.4f}".format(sentences[i], sentences[j], cosine_scores[i][j]))
|
27 |
|
28 |
+
G = nx.from_numpy_array(cosine_scores)
|
29 |
+
|
30 |
|
31 |
#-------------------------------------------------------------
|
32 |
#-------------------------------------------------------------
|