Can not import finbert model

Hi, I am trying to import finbert module but i have gotten "ModuleNotFoundError: No module named ‘finbert.finbert’ " Is there anyone to help about this issue, please?

Hi Ayse - can you share the code that led to the error message you mentioned?

And I’m wondering whether you have tried the code example from the model website on the HF Model Hub? yiyanghkust/finbert-tone · Hugging Face

I just ran this and it seems to work fine.

Cheers
Heiko

Hi, I am trying to run this part of the code:

from pathlib import Path
import shutil
import os
import logging
import sys
sys.path.append(’…’)

from textblob import TextBlob
from pprint import pprint
from sklearn.metrics import classification_report

from transformers import AutoModelForSequenceClassification
from finbert.finbert import *
import finbert.utils as tools

%load_ext autoreload
%autoreload 2
project_dir = Path.cwd().parent
pd.set_option(‘max_colwidth’, -1)

And i am getting this error :
ModuleNotFoundError: No module named ‘finbert.finbert’ Although I have install finbert-embedding on the Anaconda prompt .

thanks, Ayse

Also you can find full version of the code on this path : finBERT/finbert_training.ipynb at master · ProsusAI/finBERT · GitHub

Hi,
I am trying to run this part of the code:

from pathlib import Path
import shutil
import os
import logging
import sys
sys.path.append(’…’)

from textblob import TextBlob
from pprint import pprint
from sklearn.metrics import classification_report

from transformers import AutoModelForSequenceClassification

from finbert.finbert import *
import finbert.utils as tools

%load_ext autoreload
%autoreload 2

project_dir = Path.cwd().parent
pd.set_option(‘max_colwidth’, -1)

But I get this error :
ModuleNotFoundError: No module named ‘finbert.finbert’

I have imported to finbert-embedding also, but i can not run the code.

You can find full part of the code on this path:

thanks, Ayse

Two quick questions on this:

Cheers
Heiko