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.
- Host: GitHub
- URL: https://github.com/imsanjoykb/text-generation
- Owner: imsanjoykb
- License: mit
- Created: 2021-09-10T17:12:36.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-14T16:02:26.000Z (almost 5 years ago)
- Last Synced: 2025-02-02T06:24:12.772Z (over 1 year ago)
- Topics: flask, gpt-2, gradio-interface, huggingface, mysql, nlp
- Language: Jupyter Notebook
- Homepage: https://imsanjoykb.github.io/
- Size: 1.47 MB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://github.com/imsanjoykb/Text-Generation/)
[](https://github.com/imsanjoykb/Text-Generation/LICENCE.txt)



[](https://github.com/imsanjoykb/Text-Generation/blob/master/Text_Generation.ipynb)

# 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:

Shows Generated output:

Store Data at Database:

Shows generated data with timestamp in GUI:

## 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",
}
```