Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -66,9 +66,9 @@ def sentiment_analysis(
|
|
66 |
return e_x / e_x.sum(axis=0)
|
67 |
|
68 |
def analyze_text(text):
|
69 |
-
model_path = f"{dirname(__file__)}/{
|
70 |
print(f"Loading model from {model_path}")
|
71 |
-
tokenizer_path = f"{dirname(__file__)}/{
|
72 |
print(f"Loading tokenizer from {tokenizer_path}")
|
73 |
tokenizer = AutoTokenizer.from_pretrained(tokenizer_path)
|
74 |
model = AutoModelForSequenceClassification.from_pretrained(model_path)
|
|
|
66 |
return e_x / e_x.sum(axis=0)
|
67 |
|
68 |
def analyze_text(text):
|
69 |
+
model_path = f"{dirname(__file__)}/{model_name_or_path}/"
|
70 |
print(f"Loading model from {model_path}")
|
71 |
+
tokenizer_path = f"{dirname(__file__)}/{tokenizer_name_or_path}/"
|
72 |
print(f"Loading tokenizer from {tokenizer_path}")
|
73 |
tokenizer = AutoTokenizer.from_pretrained(tokenizer_path)
|
74 |
model = AutoModelForSequenceClassification.from_pretrained(model_path)
|