https://github.com/ashishu007/NLP-Tasks
Various NLP tasks using Huggingface and Flask
https://github.com/ashishu007/NLP-Tasks
flask natural-language-processing nlp pytorch question-answering
Last synced: 4 months ago
JSON representation
Various NLP tasks using Huggingface and Flask
- Host: GitHub
- URL: https://github.com/ashishu007/NLP-Tasks
- Owner: ashishu007
- License: mit
- Created: 2020-10-23T17:49:25.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-18T20:08:29.000Z (over 2 years ago)
- Last Synced: 2024-08-01T13:33:20.281Z (7 months ago)
- Topics: flask, natural-language-processing, nlp, pytorch, question-answering
- Language: HTML
- Homepage: http://178.128.39.191:8282
- Size: 142 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NLP-Tasks
## Web Hosting
* Access the app deployed on DigitalOcean: [http://178.128.39.191:8282](http://178.128.39.191:8282)
## Brief Description
Various NLP tasks using Huggingface and Flask. Right now, the app supports only three tasks:
1. **Sentiment Analysis**: Identify if the sentence's sentiment is _Positive_ or _Negative_.
2. **Extractive Question Answering**: For a given _Context_ paragraph ask a _Question_. You should get an _Answer_ from the paragraph.
3. **Text Generation**: Provide a _Context_ (start of a sentence) and let the AI complete your story.
Plan is to include more tasks in future. Hugginface's `transformers` library makes these things very easy to do.
Contributions are most welcome.
## Usage
0. Clone the repo:
```bash
git clone https://github.com/ashishu007/NLP-Tasks.git
```### With Docker
1. Run with docker-composer
```bash
docker-compose up
```
### Without Docker1. Navigate into the downloaded repo:
```bash
cd NLP-Tasks/flask
```2. Install the required dependencies:
```bash
pip install -r requirements.txt
```3. Run the flask-app:
* Windows Powershell:
```bash
$env:FLASK_APP="app.py"
flask run
```* Linux:
```bash
export FLASK_APP=app.py
flask run
```### Main Screen
A screenshot of main screen

## Contributions
1. Add more tasks
2. Improve the user-interface## Acknowledgement
[Huggingface's transformers](https://huggingface.co/transformers/) library has revolutionised the way state-of-the-art NLP models are being used in real-world. Without, this library, the app made here would have taken tremendous amount of work (compared to what it took rn). :)