Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ def extract_main_topic(arg1: str) -> str:
|
|
| 22 |
# Initialize BERTopic model
|
| 23 |
topic_model = BERTopic.load("MaartenGr/BERTopic_ArXiv")
|
| 24 |
|
| 25 |
-
topics, probs = topic_model.transform([
|
| 26 |
|
| 27 |
if topic_id == -1: # BERTopic assigns -1 to noise (no topic detected)
|
| 28 |
return "No clear topic detected."
|
|
|
|
| 22 |
# Initialize BERTopic model
|
| 23 |
topic_model = BERTopic.load("MaartenGr/BERTopic_ArXiv")
|
| 24 |
|
| 25 |
+
topics, probs = topic_model.transform([arg1])
|
| 26 |
|
| 27 |
if topic_id == -1: # BERTopic assigns -1 to noise (no topic detected)
|
| 28 |
return "No clear topic detected."
|