Skip to content

rohank0510/news_analyze_sentiment

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

news_analyze_sentiment

Download Dataset from below link

Please download the dataset from below link

  1. model_best: Here
  2. final: Here

Extract it inside the same directory as main.py

Downloading necessary libraries

  pip install -r requirements.txt

Setting Up Coref Server

The Coref Server is part of the innovation in the classification segment. The article is sent through a coreference resolver to identify references that points to the same entity and aggregate their score.

Please download the model.tar.gz.
Place the model.tar.gz file in the same directory as the server.py.

On Linux Machines

The coreference resolution server must be run on a different virtual environment from the main server due to package conflicts. The server requires allennlp==2.2.0 which can be installed on linux with.

    pip install allennlp==2.2.0

And the server can be ran with :

    python server.py

Docker

If your machine supports a linux container, follow these steps.

Go into the corefServer directory and build the docker image with:

    docker image build -t image_name ./

This may take anywhere from 15 to 30 minutes as we need to install these packages on the docker image :

  • pip
  • python
  • pytorch
  • allennlp

Then, starting the container will automatically set the server to listen to port 19000:

  docker run -p 19000:19000 --name container_name image_name 

###Non Linux Machines Alternatively we can use any linux VM/ container and run:

    sudo apt-get install python3
    sudo apt-get install python3-pip
    pip install allennlp==2.2.0

and start the server with :

  python3 server.py

Note that the Coref Server needs port 19000 to be open to communicate with the main server.

Running the Web Application

  streamlit run main.py

Demo Video

video.mp4

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.6%
  • Dockerfile 3.4%