Spaces:
Runtime error
Runtime error
Shivam29rathore
commited on
Commit
·
574268b
1
Parent(s):
89e7030
Update app.py
Browse files
app.py
CHANGED
@@ -69,11 +69,17 @@ def make_summary(word):
|
|
69 |
# Apply get_sentence_embeddings to dataframe to create column Embeddings
|
70 |
data['Embeddings'] = get_sentence_embeddings()
|
71 |
|
72 |
-
#Number of expected sentences
|
73 |
-
if len(tokens) <= 4:
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
NUM_CLUSTERS = 1
|
75 |
else:
|
76 |
-
NUM_CLUSTERS = len(tokens)//
|
77 |
|
78 |
iterations = 25
|
79 |
# Convert Embeddings into an array and store in variable X
|
|
|
69 |
# Apply get_sentence_embeddings to dataframe to create column Embeddings
|
70 |
data['Embeddings'] = get_sentence_embeddings()
|
71 |
|
72 |
+
#Number of expected sentences for shorter summaries
|
73 |
+
#if len(tokens) <= 4:
|
74 |
+
# NUM_CLUSTERS = 1
|
75 |
+
#else:
|
76 |
+
#NUM_CLUSTERS = len(tokens)//4
|
77 |
+
|
78 |
+
#Number of expected sentences for medium summaries
|
79 |
+
if len(tokens) <= 1:
|
80 |
NUM_CLUSTERS = 1
|
81 |
else:
|
82 |
+
NUM_CLUSTERS = len(tokens)//2
|
83 |
|
84 |
iterations = 25
|
85 |
# Convert Embeddings into an array and store in variable X
|