Skip to content

daurbek-abrikov/adv_python_flask_huggingface

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

adv_python_flask_huggingface

Title: Final project

Python, Flask for the basics, for the front: HTML and CSS Bootstrap, for the back: flask-SQLAlchemy as ORM and PostgreSQL as DBMS. For scraping we used: requests, selenium and BeautifulSoup. For summarizing text huggyingface.

The first thing is to log in to the site, by default there are users "first_user", "second_user", "third_user" with the same password "password". After authorization, you can go to the functions of the site. The site allows the user to search for news by entering the name of the desired cryptocurrency, and after clicking the "Check" button shows the news and its summary to the right of the news itself related to this cryptocurrency from coinmarketcap.com.

The principle of work is the following: first there is a search of news, then its saving in the database, then return the results from the database.

Installation

PyPI

pip install flask flask-sqlalchemy selenium bs4 chromedriver-binary

Usage

After installing needed modules, just execute app.py, it will start server.

python3 src/app.py

Then just go by port(by default 5000) generated by server: http://127.0.0.1:5000/ or http://localhost:5000/

Examples

There are three routes: '/' (default) home page, '/news' for searching for news and '/login' for authorizing.
For example, here we searched for "binance coin" coin and it returns: image image