Comments (4)
Hi, the problem is with model_path
. The model path should not be the .bin
file but the folder that includes the .bin
and config
files.
from finbert.
thanks for your response
I made a folder named "model" which has pytorch_model.bin
and config.json
.
then I tried:
!python predict.py --text_path="./test.txt" --output_dir="./output/" --model_path="./model"
but still getting:
usage: predict.py [-h] [--data_path DATA_PATH]
predict.py: error: unrecognized arguments: --text_path=./test.txt --output_dir=./output/ --model_path=./model
when I try !python predict.py -h
, I get:
usage: predict.py [-h] [--data_path DATA_PATH]
Sentiment analyzer
optional arguments:
-h, --help show this help message and exit
--data_path DATA_PATH
Path to the text file.
looks like only wants one input but when I try with 1 input I get another error...
what am I doing wrong?
from finbert.
by the way, I move out predict.py and dataset.py from scripts folder to the main one.
And I am using colab so I did not make environment and simply !pip install all the dependencies:
!pip install jupyter==1.0.0
!pip install pandas==0.23.4
!pip install python==3.7.3
!pip install numpy==1.16.3
!pip install nltk
!pip install tqdm
!pip install ipykernel==5.1.3
!pip install transformers==4.1.1
!pip install joblib==0.13.2
!pip install scikit-learn==0.21.2
!pip install spacy==2.1.4
!pip install torch==1.1.0
!pip install textblob
is problem with these?
from finbert.
Hi, I've found the problem. I did as you said AND moved datasets.py
to scripts
folder and kept predict.py
in the main folder.
then it run:))) but I got another error which fixed by
import nltk
nltk.download('punkt')
thank you so much. I will close the issue.
from finbert.
Related Issues (20)
- Preprocessing using TRC2
- Using Finbert for 240 multilabel multiclass classification HOT 1
- AxisError when call predict via REST API on Flask HOT 2
- pip install transformers is necessary to Dockerfile HOT 1
- no code for FiQA sentiment classification task? HOT 1
- ad Gateway for url: https://huggingface.co/bert-base-uncased/resolve/main/config.json
- Sentence Representation Layer
- unable to parse tokenizer_config.json HOT 1
- TypeError: ord() expected a character, but string of length 69 found HOT 1
- pretrained model assignment HOT 1
- Understanding the output HOT 3
- Incorrect prediction Using Huggingface Transformers converted to ONNX format HOT 1
- Questions about regression HOT 1
- Tokenizer HOT 2
- Size of training data
- Is Pretrained only FinBert available HOT 1
- 'FinBert' object has no attribute 'class_weights'
- Unable to run finbert on R HOT 1
- help me to create the dataset for custom data for fine tuning
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from finbert.