An open API service indexing awesome lists of open source software.

https://github.com/imsanjoykb/text-generation

The goal of this project is to detect the topic of the text and write a proper comment for the text , store the generate comment in database and shows it with rest API.
https://github.com/imsanjoykb/text-generation

flask gpt-2 gradio-interface huggingface mysql nlp

Last synced: 12 months ago
JSON representation

The goal of this project is to detect the topic of the text and write a proper comment for the text , store the generate comment in database and shows it with rest API.

Awesome Lists containing this project

README

          

![Author](https://img.shields.io/badge/author-SanjoyBiswas-orange)
[![Stars](https://img.shields.io/github/stars/imsanjoykb/Text-Generation.svg?style=social)](https://github.com/imsanjoykb/Text-Generation/)
[![MIT](https://img.shields.io/badge/license-MIT-5eba00.svg)](https://github.com/imsanjoykb/Text-Generation/LICENCE.txt)
![Python](https://img.shields.io/badge/Python-3.8-blueviolet)
![Framework](https://img.shields.io/badge/Framework-Flask-red)
![Frontend](https://img.shields.io/badge/Frontend-HTML/CSS/JS-green)
[![Open Notebook](https://colab.research.google.com/assets/colab-badge.svg)](https://github.com/imsanjoykb/Text-Generation/blob/master/Text_Generation.ipynb)

![alt text](Assets/banner.jpg "Title")

# Author: Sanjoy Biswas

Data Scientist | Machine Learning Engineer
Website: https://imsanjoykb.github.io/
ResearchGate: https://www.researchgate.net/profile/imsanjoykb
Linkedin: https://www.linkedin.com/in/imsanjoykb/
Email: sanjoy.eee32@gmail.com


## Objective

The goal of this project is to detect the topic of the text and write a proper comment for the text , store the generate comment in database and shows it with rest API.


## Background

Text generation is an application of language modeling, and a subfield of natural language processing. It utilizes techniques in artificial intelligence to automatically generate natural language text, which fits in a certain communication context.

Text generation can be used to write stories, poems, emails, news articles, and more. It is also useful for machine translation.


## Project Installation

Install the virtualenv package
```
pip install virtualenv
```
Create the virtual environment
```
virtualenv venv
```
Activate the virtual environment
```
mypthon\Scripts\activate
```
Install Dependencies
```
pip3 install -r requirements.txt
```
Run the text generation code which redirect userinterface of Gradio and the input of the text generate datafile
```
python Text_Generation.py
```
After this, run main.py file which scale the data and connect with database to store data at DB
```
python main.py
```
Then run app.py file which shows all data and also Gradio
```
python app.py
```


## Project GUI
Gradio Interface for text generation:

![alt text](Assets/Interface1.PNG "Title")

Shows Generated output:

![alt text](Assets/Interface2.PNG "Title")

Store Data at Database:

![alt text](Assets/database1.PNG "Title")

Shows generated data with timestamp in GUI:

![alt text](Assets/data.PNG "Title")


## Citing
```
@misc{AI Text Generation,
author = {Sanjoy Biswas},
title = {Detect the topic of the text and write a proper comment for the text, store the generate comment in database and shows it with rest API.},
year = {2021},
publisher = {GitHub},
journal = {GitHub repository},
url="https://github.com/imsanjoykb/Text-Generation",
}
```