Skip to content

An Artificial Intelligence Agent that generates text using Deep Neural Networks.

License

Notifications You must be signed in to change notification settings

khanfarhan10/TextGeneration

Repository files navigation

Text Generation

Designing Artificial Intelligence Agents that generate text using Deep Neural Networks. Deployed on the Cloud using Streamlit on the Heroku Platform.

Web Application Demo

View the deployed WebApp on Heroku.

Installation : Setting up the Application Locally

  • Dependencies:
    • Run the command pip install -r TextGenReq.txt on your cmd/python terminal.
    • It is highly recommended to create a new Virtual Environment first before running the above commands. The instructions for doing the same is provided below.
  • Deployment:
    • Use Streamlit App : streamlit run TextGenApp.py
  • If there is no popup window opening in the browser you can paste the following address : http://localhost:8501/.

Creating Virtual Environments for Python Development in Visual Studio Code for this Project

A Guide to Creating Virtual Environments into Python and Using them Effectively.

Clone the Text Sentiment Analysis Repo :

Head over to our github repository ,fork the repo to your github account & clone the repository into your local machine.

Initial Setup

Open CMD/PowerShell from the VSCode Terminal :

It should display an output like the following :

CMD

Microsoft Windows [Version 10.0.18363.1198] (c) 2019 Microsoft Corporation. All rights reserved.

or

Powershell

Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Try the new cross-platform PowerShell https://aka.ms/pscore6

Check for the python version you're running :

C:\Users\Tannistha Pal\Documents\GitHub\TextGeneration>python --version Python 3.9.0

Note : You must install Python version 3.7.6 for using this project.

Check for the Python Packaging Index (Pypi) version you're running :

C:\Users\Tannistha Pal\Documents\GitHub\TextGeneration>pip --version pip 20.2.3 from c:\users\tannistha pal\appdata\local\programs\python\python39\lib\site-packages\pip (python 3.9)

Install the virtualenv module from pip (install it globally):

C:\Users\Tannistha Pal\Documents\GitHub\TextGeneration>pip install virtualenv

Create a project environment directory with YourAwesomeProjectNameEnvironment :

C:\Users\Tannistha Pal\Documents\GitHub\TextGeneration>mkdir TextGenEnv

Create a new (empty) virtual environment in YourAwesomeProjectNameEnvironment :

C:\Users\Tannistha Pal\Documents\GitHub\TextGeneration>virtualenv TextGenEnv

Users for other python versions may Install Python 3.7.6 first and then run the following command to choose the correct python interpreter with the correct path :

virtualenv --python=python3.7.6 TextGen

Note : If you have problems with this step, try followng the debugging options provided below.

Enter into the newly created (empty) virtual environment in YourAwesomeProjectNameEnvironment : C:\Users\Tannistha Pal\Documents\GitHub\TextGeneration>TextGenEnv\Scripts\activate

You will notice a (YourAwesomeProjectNameEnvironment) appearing in the Command Line Interface : (TextGenEnv) C:\Users\Tannistha Pal\Documents\GitHub\TextGeneration>

Wohoooo! You're now in your virtual environment.

Install Dependencies :

Okay Great! We've got our virtualenv setup, but it's empty right now. Lets install some modules into it.

For this we will be needing a .txt file noting all the dependency requirements for a project under the project directory.

This file contains packages in the following naming fashion and can be obtained using

pip freeze > requirements.txt

or using

conda list --explicit > reqs.txt

When you've obtained the requirements file, do the following with your Environment Activated : (TextGenEnv) C:\Users\Tannistha Pal\Documents\GitHub\TextGeneration>pip install -r TextGenReq.txt

Note : If you have problems with this step, try installing Microsoft C++ Build Tools.

You are now happy to go forth coding and running your app with : streamlit run TextGenApp.py

Useful Links for Debugging :

Voila Magic!

If you have further issues/queries regarding the project, feel free to contact us :

About

An Artificial Intelligence Agent that generates text using Deep Neural Networks.

Topics

Resources

License

Stars

Watchers

Forks

Languages