DeDeckerThomas commited on
Commit
24f3280
β€’
1 Parent(s): e4f39c4

Fixed version bugs

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. requirements.txt +3 -1
  3. test.py +0 -13
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: πŸ”‘
4
  colorFrom: yellow
5
  colorTo: red
6
  sdk: streamlit
7
- sdk_version: 1.9.0
8
  app_file: app.py
9
  pinned: false
10
  license: mit
 
4
  colorFrom: yellow
5
  colorTo: red
6
  sdk: streamlit
7
+ sdk_version: 1.2.0
8
  app_file: app.py
9
  pinned: false
10
  license: mit
requirements.txt CHANGED
@@ -1,4 +1,6 @@
1
  orjson==3.6.8
2
  transformers[torch]==4.17.0
3
  pandas==1.4.1
4
- numpy==1.22.3
 
 
 
1
  orjson==3.6.8
2
  transformers[torch]==4.17.0
3
  pandas==1.4.1
4
+ numpy==1.22.3
5
+ st-annotated-text==3.0.0
6
+ streamlit-aggrid==0.2.3.post2
test.py DELETED
@@ -1,13 +0,0 @@
1
- from transformers import AutoModelForSequenceClassification, AutoTokenizer
2
- from transformers_interpret import MultiLabelClassificationExplainer
3
-
4
- model_name = "j-hartmann/emotion-english-distilroberta-base"
5
- model = AutoModelForSequenceClassification.from_pretrained(model_name)
6
- tokenizer = AutoTokenizer.from_pretrained(model_name)
7
-
8
-
9
- cls_explainer = MultiLabelClassificationExplainer(model, tokenizer)
10
-
11
-
12
- word_attributions = cls_explainer("There were many aspects of the film I liked, but it was frightening and gross in parts. My parents hated it.")
13
- print(word_attributions)