gyesibiney
commited on
Commit
•
9ce8001
1
Parent(s):
bca6066
Update main.py
Browse files
main.py
CHANGED
@@ -12,11 +12,11 @@ tokenizer = AutoTokenizer.from_pretrained(model_name)
|
|
12 |
# Create a sentiment analysis pipeline
|
13 |
sentiment = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
|
14 |
|
|
|
15 |
# Create a dictionary to map sentiment labels to positive and negative strings
|
16 |
sentiment_label_mapping = {
|
17 |
"LABEL_1": "positive",
|
18 |
-
"LABEL_0": "negative",
|
19 |
-
}
|
20 |
|
21 |
# Define a request body model
|
22 |
class SentimentRequest(BaseModel):
|
|
|
12 |
# Create a sentiment analysis pipeline
|
13 |
sentiment = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
|
14 |
|
15 |
+
|
16 |
# Create a dictionary to map sentiment labels to positive and negative strings
|
17 |
sentiment_label_mapping = {
|
18 |
"LABEL_1": "positive",
|
19 |
+
"LABEL_0": "negative",}
|
|
|
20 |
|
21 |
# Define a request body model
|
22 |
class SentimentRequest(BaseModel):
|