Merge branches 'main' and 'main' of https://huggingface.co/spaces/Harsh502s/Autonomous_Text_Tagging_App
Browse files- Pages/Models.py +3 -3
Pages/Models.py
CHANGED
|
@@ -115,7 +115,7 @@ def output_unsupervised(text, n):
|
|
| 115 |
for i in range(n):
|
| 116 |
tags = bertopic_model.get_topic(similar_topics[i])
|
| 117 |
tags = [tag[0] for tag in tags]
|
| 118 |
-
tagger_component(f"Tags from cluster {i+1}:", tags
|
| 119 |
|
| 120 |
|
| 121 |
# Display the supervised model page of the app
|
|
@@ -125,7 +125,7 @@ def supervised_page():
|
|
| 125 |
text = clean_text(text)
|
| 126 |
if st.button("Assign tags", key="supervised_button"):
|
| 127 |
tags = tag_cnn_model(text)[0]
|
| 128 |
-
tagger_component("Tags:", tags
|
| 129 |
|
| 130 |
|
| 131 |
# Display the unsupervised model using bertopic page of the app
|
|
@@ -170,7 +170,7 @@ def semi_unsupervised_page_keybert():
|
|
| 170 |
if st.button("Assign tags", key="unsupervised_button_keybert"):
|
| 171 |
topics = retrieve_keyphrases(text, n, ngram_range)
|
| 172 |
topics = [topic[0] for topic in topics]
|
| 173 |
-
tagger_component("Tags:", topics
|
| 174 |
|
| 175 |
|
| 176 |
# Display the model page of the app
|
|
|
|
| 115 |
for i in range(n):
|
| 116 |
tags = bertopic_model.get_topic(similar_topics[i])
|
| 117 |
tags = [tag[0] for tag in tags]
|
| 118 |
+
tagger_component(f"Tags from cluster {i+1}:", tags)
|
| 119 |
|
| 120 |
|
| 121 |
# Display the supervised model page of the app
|
|
|
|
| 125 |
text = clean_text(text)
|
| 126 |
if st.button("Assign tags", key="supervised_button"):
|
| 127 |
tags = tag_cnn_model(text)[0]
|
| 128 |
+
tagger_component("Tags:", tags)
|
| 129 |
|
| 130 |
|
| 131 |
# Display the unsupervised model using bertopic page of the app
|
|
|
|
| 170 |
if st.button("Assign tags", key="unsupervised_button_keybert"):
|
| 171 |
topics = retrieve_keyphrases(text, n, ngram_range)
|
| 172 |
topics = [topic[0] for topic in topics]
|
| 173 |
+
tagger_component("Tags:", topics)
|
| 174 |
|
| 175 |
|
| 176 |
# Display the model page of the app
|