qanastek commited on
Commit
e48f2eb
1 Parent(s): 217277b

Update the config.json

Browse files
Files changed (2) hide show
  1. config.json +2 -2
  2. predict.py +6 -1
config.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fe78d7c3389c4dfcb976f4eeda3d836d7cc9348901a84fe5720ddb6b939b9e38
3
- size 3290
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:75f1b7aecf776b76a7c3f771daebc1ef742a09a2d57c449749436100a0fd47f5
3
+ size 4002
predict.py CHANGED
@@ -1,9 +1,14 @@
1
  from transformers import AutoTokenizer, AutoModelForSequenceClassification, TextClassificationPipeline
2
 
 
 
3
  model_name = 'qanastek/XLMRoberta-Alexa-Intents-Classification'
4
  tokenizer = AutoTokenizer.from_pretrained(model_name)
5
  model = AutoModelForSequenceClassification.from_pretrained(model_name)
6
  classifier = TextClassificationPipeline(model=model, tokenizer=tokenizer)
7
 
8
  res = classifier("réveille-moi à neuf heures du matin le vendredi")
9
- print(res)
 
 
 
 
1
  from transformers import AutoTokenizer, AutoModelForSequenceClassification, TextClassificationPipeline
2
 
3
+ classes = ['audio_volume_other', 'play_music', 'iot_hue_lighton', 'general_greet', 'calendar_set', 'audio_volume_down', 'social_query', 'audio_volume_mute', 'iot_wemo_on', 'iot_hue_lightup', 'audio_volume_up', 'iot_coffee', 'takeaway_query', 'qa_maths', 'play_game', 'cooking_query', 'iot_hue_lightdim', 'iot_wemo_off', 'music_settings', 'weather_query', 'news_query', 'alarm_remove', 'social_post', 'recommendation_events', 'transport_taxi', 'takeaway_order', 'music_query', 'calendar_query', 'lists_query', 'qa_currency', 'recommendation_movies', 'general_joke', 'recommendation_locations', 'email_querycontact', 'lists_remove', 'play_audiobook', 'email_addcontact', 'lists_createoradd', 'play_radio', 'qa_stock', 'alarm_query', 'email_sendemail', 'general_quirky', 'music_likeness', 'cooking_recipe', 'email_query', 'datetime_query', 'transport_traffic', 'play_podcasts', 'iot_hue_lightchange', 'calendar_remove', 'transport_query', 'transport_ticket', 'qa_factoid', 'iot_cleaning', 'alarm_set', 'datetime_convert', 'iot_hue_lightoff', 'qa_definition', 'music_dislikeness']
4
+
5
  model_name = 'qanastek/XLMRoberta-Alexa-Intents-Classification'
6
  tokenizer = AutoTokenizer.from_pretrained(model_name)
7
  model = AutoModelForSequenceClassification.from_pretrained(model_name)
8
  classifier = TextClassificationPipeline(model=model, tokenizer=tokenizer)
9
 
10
  res = classifier("réveille-moi à neuf heures du matin le vendredi")
11
+ print(res)
12
+ # idx = int(res[0]["label"].split("_")[-1])
13
+ # print(idx)
14
+ # print(classes[idx])