acecalisto3 commited on
Commit
349246d
·
verified ·
1 Parent(s): 81806d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -31,8 +31,11 @@ from mysql.connector import errorcode, pooling
31
  from dotenv import load_dotenv
32
  from huggingface_hub import login
33
 
34
- # Initialize a zero-shot classification pipeline
35
- classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
 
 
 
36
 
37
  def parse_command(message):
38
  candidate_labels = ["filter", "sort", "export", "log"]
 
31
  from dotenv import load_dotenv
32
  from huggingface_hub import login
33
 
34
+ # Load model directly
35
+ from transformers import AutoTokenizer, AutoModelForMaskedLM
36
+
37
+ tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-mpnet-base-v2")
38
+ model = AutoModelForMaskedLM.from_pretrained("sentence-transformers/all-mpnet-base-v2")
39
 
40
  def parse_command(message):
41
  candidate_labels = ["filter", "sort", "export", "log"]