Skip to content

phcreery/Document-Enhancer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Document-Enhancer

A python script to fix, format, and expand your document. It's main feature is utilizing OpenAI to add content to your paragraphs and setting the format as MLA. This works best on narrative and descriptive essays.

My script Utilizes the open source GPT-2 from OpenAI modified to use Pytorch to use machine learning to create sentances and paragraphs.

https://github.com/graykode/gpt-2-Pytorch

https://github.com/openai/gpt-2

Installing and Testing GPT-2

To get started:

  • Install pytorch from here: https://pytorch.org/

  • Install dependencies: pip3 install tqdm regex==2017.4.5

  • Clone gpt-2: git clone https://github.com/graykode/gpt-2-Pytorch && mv gpt-2-Pytorch gpt2Pytorch && cd gpt2Pytorch

  • Download the 117M model: curl --output gpt2-pytorch_model.bin https://s3.amazonaws.com/models.huggingface.co/bert/gpt2-pytorch_model.bin

  • Test it out: python main.py --text "It was a bright cold day in April, and the clocks were striking thirteen. Winston Smith, his chin nuzzled into his breast in an effort to escape the vile wind, slipped quickly through the glass doors of Victory Mansions, though not quickly enough to prevent a swirl of gritty dust from entering along with him."

Enhancing your document

Prerequisites: pip install python-docx==0.8.10

  • Save your document in the working directory as "test.docx"

  • Run python3 main2.py

  • The results will be in "mla.docx

Goals

This is the list of future changes:

  • Use openAI's gpt2 instead of pytorch variant
  • Impliment May release of 345M, Medium sized model
  • Create methods of expanding, filling, and modifying initial work.
  • Citations? Expository & Persuasive essays?
  • Support other citaiton formats like APA, Chicago, etc.

About

Use AI to fix, expand, or finish your report.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published