Spaces:
Runtime error
Runtime error
| from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline | |
| tokenizer = AutoTokenizer.from_pretrained("turing-usp/FinBertPTBR") | |
| model = AutoModelForSequenceClassification.from_pretrained("turing-usp/FinBertPTBR") | |
| classifier = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer) | |
| def predict(data): | |
| return classifier(data) | |
| def predict_general(data): | |
| classifier = pipeline("sentiment-analysis") | |
| return classifier(data) |