Repository: flairNLP/flair

Issue:
muse embedding download 301
MuseCrosslingualEmbeddings still refer to the old storage to download the embeddings, causing an error.

To solve:
- Add the embedding files to the new storage
- Update the download path in MuseCrosslingualEmbeddings._add_embeddings_internal
AttributeError: 'DistilBertConfig' object has no attribute 'return_dict'
## Environment info
* Google Colab
- `transformers` version: 3.1.0
- Platform: Linux-4.19.112+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyTorch version (GPU?): 1.6.0+cu101 (False)
- Tensorflow version (GPU?): 2.3.0 (False)
- Using GPU in script?: <True>
- Using distributed or parallel set-up in script?: <False>
## Information

Model I am using (Bert, XLNet ...):

The problem arises when using:
* [ ] the official example scripts: (give details below)
* [ ] my own modified scripts: (give details below)

```python
import flair
flair_sent = flair.models.TextClassifier.load('en-sentiment')

def flair_lstm(text):
    sentence = flair.data.Sentence(text)
    flair_sent.predict(sentences=sentence)
    total_sent = sentence.labels
    for label in total_sent:
        value = label.value
        score = label.score
        return '1' if value == 'POSITIVE' else '-1'
```

The tasks I am working on is:
* I'm working with flair to get classification polarities, but the issue seems refer to transformers

## To reproduce

Steps to reproduce the behavior:

1. write
```python
def flair_lstm(text):
    sentence = flair.data.Sentence(text)
    flair_sent.predict(sentences=sentence)
    total_sent = sentence.labels
    for label in total_sent:
        value = label.value
        score = label.score
        return '1' if value == 'POSITIVE' else '-1'

df_test = "some test dataframe"
df_test['flair'] = df_test['word'].apply(lambda x: flair_lstm(x))
```
2. See error:

## Traceback:

```python
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-26-1ee39d7138b3> in <module>()
----> 1 df_test['flair'] = df_test['word'].apply(lambda x: flair_lstm(x))

10 frames
pandas/_libs/lib.pyx in pandas._libs.lib.map_infer()

/usr/local/lib/python3.6/dist-packages/transformers/configuration_utils.py in use_return_dict(self)
    217         """
    218         # If torchscript is set, force `return_dict=False` to avoid jit errors
--> 219         return self.return_dict and not self.torchscript
    220 
    221     @property

AttributeError: 'DistilBertConfig' object has no attribute 'return_dict'
```

## Expected output:
- prediction of each word of the dataframe using the flair_lstm function


Discussion:

Answer from transformers repository: https://github.com/huggingface/transformers/issues/6891

Resolving patch:
diff --git a/flair/embeddings/token.py b/flair/embeddings/token.py
--- a/flair/embeddings/token.py
+++ b/flair/embeddings/token.py
@@ -1437,14 +1437,14 @@ def _add_embeddings_internal(self, sentences: List[Sentence]) -> List[Sentence]:
             if language_code not in self.language_embeddings:
                 log.info(f"Loading up MUSE embeddings for '{language_code}'!")
                 # download if necessary
-                webpath = "https://alan-nlp.s3.eu-central-1.amazonaws.com/resources/embeddings-muse"
+                hu_path: str = "https://flair.informatik.hu-berlin.de/resources/embeddings/muse"
                 cache_dir = Path("embeddings") / "MUSE"
                 cached_path(
-                    f"{webpath}/muse.{language_code}.vec.gensim.vectors.npy",
+                    f"{hu_path}/muse.{language_code}.vec.gensim.vectors.npy",
                     cache_dir=cache_dir,
                 )
                 embeddings_file = cached_path(
-                    f"{webpath}/muse.{language_code}.vec.gensim", cache_dir=cache_dir
+                    f"{hu_path}/muse.{language_code}.vec.gensim", cache_dir=cache_dir
                 )
 
                 # load the model
diff --git a/flair/models/text_classification_model.py b/flair/models/text_classification_model.py
--- a/flair/models/text_classification_model.py
+++ b/flair/models/text_classification_model.py
@@ -467,10 +467,10 @@ def _fetch_model(model_name) -> str:
 
         # English sentiment models
         model_map["sentiment"] = "/".join(
-            [hu_path, "sentiment-curated-distilbert", "sentiment-en-mix-distillbert.pt"]
+            [hu_path, "sentiment-curated-distilbert", "sentiment-en-mix-distillbert_3.1.pt"]
         )
         model_map["en-sentiment"] = "/".join(
-            [hu_path, "sentiment-curated-distilbert", "sentiment-en-mix-distillbert.pt"]
+            [hu_path, "sentiment-curated-distilbert", "sentiment-en-mix-distillbert_3.1.pt"]
         )
         model_map["sentiment-fast"] = "/".join(
             [hu_path, "sentiment-curated-fasttext-rnn", "sentiment-en-mix-ft-rnn.pt"]


Test patch: