Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -214,15 +214,18 @@ if file_text:
|
|
214 |
|
215 |
with col2:
|
216 |
st.subheader("Clustered Text")
|
|
|
217 |
clustered_text = ""
|
218 |
cluster_high_info_words = get_high_info_words_per_cluster(clustered_sentences)
|
219 |
|
220 |
for i, cluster in enumerate(clustered_sentences):
|
221 |
cluster_text = "\n".join(cluster)
|
222 |
high_info_words = ", ".join(cluster_high_info_words[i])
|
|
|
223 |
clustered_text += f"Cluster {i+1} (High Info Words: {high_info_words}):\n{cluster_text}\n\n"
|
224 |
|
225 |
-
st.text_area("
|
|
|
226 |
|
227 |
# Verify that all sentences are accounted for in the clustered output
|
228 |
clustered_sentences_flat = [sentence for cluster in clustered_sentences for sentence in cluster]
|
|
|
214 |
|
215 |
with col2:
|
216 |
st.subheader("Clustered Text")
|
217 |
+
clusters = ""
|
218 |
clustered_text = ""
|
219 |
cluster_high_info_words = get_high_info_words_per_cluster(clustered_sentences)
|
220 |
|
221 |
for i, cluster in enumerate(clustered_sentences):
|
222 |
cluster_text = "\n".join(cluster)
|
223 |
high_info_words = ", ".join(cluster_high_info_words[i])
|
224 |
+
clusters += f"Cluster {i+1} (High Info Words: {high_info_words})\n"
|
225 |
clustered_text += f"Cluster {i+1} (High Info Words: {high_info_words}):\n{cluster_text}\n\n"
|
226 |
|
227 |
+
st.text_area("Clusters", value=clusters, height=200)
|
228 |
+
st.text_area("Clustered Sentences", value=clustered_text, height=200)
|
229 |
|
230 |
# Verify that all sentences are accounted for in the clustered output
|
231 |
clustered_sentences_flat = [sentence for cluster in clustered_sentences for sentence in cluster]
|