Coder Social home page Coder Social logo

sakshamj74 / news_classification Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 6.22 MB

To classify a headline into three categories namely Business,technology and Sport

Jupyter Notebook 82.57% Python 3.79% HTML 12.96% CSS 0.68%
python flask herokuapp news-classification sport headline nlp deployment

news_classification's Introduction

News_classification

To classify a headline into three categories namely Business,technology and Sport news_scrapping file is used to crate our own dataset news_clssification is the main file where various models,vectorisation,encodings are performed. To join various files i have used an online text file joiner.Here is the link https://www.filesmerge.com/merge-text-files final_dataset is the final dataset after scrapping and joining.

Deployment Using Flask To Heroku

  • app1.py is the main flask app file
  • model.pkl is the saved trained model
  • tf1.pkl cantains the saved vocubalary for the trained model

Technologies Used

  • Flask
  • Pyhton
  • NLP
  • Heroku
  • scikit-learn

news_classification's People

Contributors

sakshamj74 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

brian17659

news_classification's Issues

Need Help in deploy an app on Heroku

Hey Sir! can you please guide me
how can i make tfidf model like 'tf1.pkl'
I want to deploy my Flask app on Heroku
but while deployment i found internal server error because of these line
nlp = spacy.load('en_core_web_sm') #use for tokeinzation and remove stopwords from dataset stopwords = list(STOP_WORDS) punct = string.punctuation def text_data_cleaning(sentence): doc = nlp(sentence) tokens = [] for token in doc: if token.lemma_ != '-PRON-': temp = token.lemma_.lower().strip() else: temp = token.lower_ tokens.append(temp) cleaned_tokens = [] for token in tokens: if token not in stopwords and token not in punct: cleaned_tokens.append(token) return cleaned_tokens tfidf = TfidfVectorizer(tokenizer=text_data_cleaning)

And after running command heroku logs it show me the error of
AttributeError: module '__main__' has no attribute 'text_data_cleaning'
please sir guide me....
Thanks in advance...!!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.