peterkros commited on
Commit
3ab38d3
·
verified ·
1 Parent(s): a19be54

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -25,7 +25,8 @@ bad_words = load_bad_words('badwords.txt') # Adjust the path to your bad words
25
  topics_list = ['Aviation', 'Science', 'Education', 'Air Force Pilot', 'Space Exploration', 'Technology']
26
 
27
  #Load BerTopic model
28
- topic_model = BERTopic.load("MaartenGr/BERTopic_Wikipedia")
 
29
 
30
  def is_inappropriate_or_offtopic(message, selected_topics):
31
  # Assume bad_words loading and check_content function are defined here
 
25
  topics_list = ['Aviation', 'Science', 'Education', 'Air Force Pilot', 'Space Exploration', 'Technology']
26
 
27
  #Load BerTopic model
28
+ sentence_model = SentenceTransformer("all-MiniLM-L6-v2")
29
+ topic_model = BERTopic(embedding_model=sentence_model)
30
 
31
  def is_inappropriate_or_offtopic(message, selected_topics):
32
  # Assume bad_words loading and check_content function are defined here