Spaces:
Runtime error
Runtime error
hacpdsae2023
commited on
Commit
·
1bce5cd
1
Parent(s):
02a8d5f
add slider for threshold
Browse files
app.py
CHANGED
@@ -6,6 +6,8 @@ dataset = load_dataset("roneneldan/TinyStories")
|
|
6 |
|
7 |
st.write(dataset['train'][10]['text'])
|
8 |
|
|
|
|
|
9 |
#-------------------------------------------------------------
|
10 |
#-------------------------------------------------------------
|
11 |
|
@@ -35,7 +37,7 @@ for i in range(len(sentences)):
|
|
35 |
A[j][i] = cosine_scores[i][j]
|
36 |
|
37 |
#G = nx.from_numpy_array(A)
|
38 |
-
G = nx.from_numpy_array(cosine_scores.numpy()>
|
39 |
|
40 |
|
41 |
#-------------------------------------------------------------
|
|
|
6 |
|
7 |
st.write(dataset['train'][10]['text'])
|
8 |
|
9 |
+
threshhold = st.slider('Threshhold',0,1)
|
10 |
+
|
11 |
#-------------------------------------------------------------
|
12 |
#-------------------------------------------------------------
|
13 |
|
|
|
37 |
A[j][i] = cosine_scores[i][j]
|
38 |
|
39 |
#G = nx.from_numpy_array(A)
|
40 |
+
G = nx.from_numpy_array(cosine_scores.numpy()>threshhold)
|
41 |
|
42 |
|
43 |
#-------------------------------------------------------------
|