(I prefere using Visual Studio Code )
Open the folder in VS Code
Run the first cell in requirement.ipynb
VS Code will demand to install Jupiter and python, install them , after that return to requirement.ipynb and click Run ALL (you should choose your interpreter of python )
TO train and then Predict !

type in terminal :

import nltk‘stopwords’)‘punkt’)

the CSV file !

and save it in Predicting-Tweet-Sentiment-Maching-Learning-and-streamlit FOLDER

in the terminal , run:

pip install streamlit

Now , you can run directly web app because the result of training is already saved in saved_steps1.pkl using pickle
and the result of predicting is in results/result_predictions_1000_tweets.csv

in the terminal :
go to the repository of the folder
and then run the command :

streamlit run

But if you want to train the model before running the web app

Run All cells in SentimentPrediction.ipynb
you will obtain result_predictions_1000_tweets.csv and saved_steps1.pkl

You can also run to get tweets using Twitter API
you will obtain result1.csv

Anytime RUN :
streamlit run
and upload any of the CSV files
or type your own statement to predict if it is positive or not

Contactez-moi : [email protected]


View Github