You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Xformers is not installed correctly. If you want to use memory_efficient_attention to accelerate training use the following command to install Xformers
pip install xformers.
Code:
import argparse
from transformers import pipeline
# Create the parser
parser = argparse.ArgumentParser(description="Perform sentiment analysis")
# Add an argument
parser.add_argument('Text', type=str, help="the text to analyze")
# Parse the argument
args = parser.parse_args()
# Load the classifier
classifier = pipeline("sentiment-analysis", model="distilbert-base-uncased-finetuned-sst-2-english")
# Perform sentiment analysis
res = classifier(args.Text)
# Print the result
print(res)
Who can help?
No response
Information
The official example scripts
My own modified scripts
Tasks
An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
My own task or dataset (give details below)
Reproduction
Steps to reproduce this behavior:
run my code
receive error
Expected behavior
no error
The text was updated successfully, but these errors were encountered:
System Info
System info:
Error:
Code:
Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Steps to reproduce this behavior:
Expected behavior
no error
The text was updated successfully, but these errors were encountered: