abdullahmubeen10 commited on
Commit
b23d24b
β€’
1 Parent(s): a1587c9

Update Demo.py

Browse files
Files changed (1) hide show
  1. Demo.py +3 -3
Demo.py CHANGED
@@ -47,7 +47,7 @@ def create_pipeline():
47
  .setInputCols(['document']) \
48
  .setOutputCol('token')
49
 
50
- sequence_classifier = XlmRoBertaForSequenceClassification.pretrained() \
51
  .setInputCols(["document", "token"]) \
52
  .setOutputCol("class")
53
 
@@ -76,8 +76,8 @@ def annotate(data):
76
 
77
  tasks_models_descriptions = {
78
  "Sequence Classification": {
79
- "models": ["xlmroberta_classifier_base_mrpc"],
80
- "description": "The 'xlmroberta_classifier_base_mrpc' model is proficient in sequence classification tasks, such as sentiment analysis and document categorization. It effectively determines the sentiment of reviews, classifies text, and sorts documents based on their content and context."
81
  }
82
  }
83
 
 
47
  .setInputCols(['document']) \
48
  .setOutputCol('token')
49
 
50
+ sequence_classifier = XlmRoBertaForSequenceClassification.pretrained('xlm_roberta_base_sequence_classifier_imdb', 'en') \
51
  .setInputCols(["document", "token"]) \
52
  .setOutputCol("class")
53
 
 
76
 
77
  tasks_models_descriptions = {
78
  "Sequence Classification": {
79
+ "models": ["xlm_roberta_base_sequence_classifier_imdb"],
80
+ "description": "The 'xlm_roberta_base_sequence_classifier_imdb' model is specialized for sentiment analysis of movie reviews. It accurately classifies IMDb reviews as positive or negative, leveraging the multilingual capabilities of XLM-RoBERTa to analyze text content and sentiment across different languages."
81
  }
82
  }
83