Views
No views yet
roberta-base , which is an optimized variant of BERT. It was developed to overcome the limitations of traditional keyword-based approaches, which often fail to capture the contextual relationships between words in issue reports.1from transformers import pipeline
2
3# Load the pipeline
4
5classifier = pipeline("text-classification", model="vinaykarman/robertabase", return_all_scores=True)
6
7# Example issue text (concatenated title and body)
8issue_text = """
9Title: USBhost: additional functions for keyboard appreciated
10Body: for USBhost it would be fine to have additional functions to read the USB keyboard: kbhit() getch() getche() getchar() gets() scanf()
11"""
12
13# Get predictions
14predictions = classifier(issue_text)
15print(predictions)
16
17# Expected output would be a list of scores for each label:
18# [[{'label': 'bug', 'score': 0.8}, {'label': 'enhancement', 'score': 0.75}, {'label': 'question', 'score': 0.05}]]