Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,8 +5,8 @@ import torch
|
|
| 5 |
# Load models and tokenizers
|
| 6 |
sarcasm_model = AutoModelForSequenceClassification.from_pretrained("dnzblgn/Sarcasm-Detection-Customer-Reviews")
|
| 7 |
sentiment_model = AutoModelForSequenceClassification.from_pretrained("dnzblgn/Sentiment-Analysis-Customer-Reviews")
|
| 8 |
-
sarcasm_tokenizer = AutoTokenizer.from_pretrained("
|
| 9 |
-
sentiment_tokenizer = AutoTokenizer.from_pretrained("
|
| 10 |
|
| 11 |
# Function to analyze sentiment
|
| 12 |
def analyze_sentiment(sentence):
|
|
|
|
| 5 |
# Load models and tokenizers
|
| 6 |
sarcasm_model = AutoModelForSequenceClassification.from_pretrained("dnzblgn/Sarcasm-Detection-Customer-Reviews")
|
| 7 |
sentiment_model = AutoModelForSequenceClassification.from_pretrained("dnzblgn/Sentiment-Analysis-Customer-Reviews")
|
| 8 |
+
sarcasm_tokenizer = AutoTokenizer.from_pretrained("dnzblgn/Sarcasm-Detection-Customer-Reviews", use_fast=False)
|
| 9 |
+
sentiment_tokenizer = AutoTokenizer.from_pretrained("dnzblgn/Sentiment-Analysis-Customer-Reviews", use_fast=False)
|
| 10 |
|
| 11 |
# Function to analyze sentiment
|
| 12 |
def analyze_sentiment(sentence):
|