Spaces:
Runtime error
Runtime error
acecalisto3
commited on
Update app.py
Browse files
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 |
-
#
|
35 |
-
|
|
|
|
|
|
|
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"]
|