alexandrainst / danlp

DaNLP is a repository for Natural Language Processing resources for the Danish Language.
BSD 3-Clause "New" or "Revised" License
199 stars 34 forks source link

outdated SSL certificate in the downloads url (https://danlp-downloads.alexandra.dk/) #153

Closed AsbjornLind closed 3 years ago

AsbjornLind commented 3 years ago

Describe the bug SSL certificate is outdated, so the site looks like an unsecure website. Hence the model can't be loaded without turning off ssl verification. I wanted to use this project in google cloud, but i get this error when running it on a cloud function;

urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1131)>

On my phone (4g network) i can see that the license expired 8 days ago if thats any help.

To Reproduce open; https://danlp-downloads.alexandra.dk/

Your Environment

AsbjornLind commented 3 years ago

update: This is the code snippet I run:

from danlp.models import load_bert_tone_model

classifier = load_bert_tone_model()

def get_sentiment(tweets):
    analytic = []
    sentiment = []    
    for sentence in tweets:
        sentiment.append(classifier.predict(sentence)['polarity'])
        analytic.append(classifier.predict(sentence)['analytic'])
    return sentiment, analytic 
ophelielacroix commented 3 years ago

Thanks for notifying us about the problem. It is fixed now so you should be able to download the models.