Skip to content

hishamad/Text-Summarizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text-Summarizer

To run the files

We used the Amazon Fine Food Reviews dataset and in order to run any of the notebooks you need to download it and get the "Reviews.csv" file.

There are two parts of the project:

RNN part

Train

Demo

Fine-tuning part

In this part, the notebooks were created and executed on the KTH cluster provided from the course. There are two notebooks, one for the training code fine-tune-final.ipynb and the other for the demo/inference fine-tune-demo.ipynb.

Run fine-tune-final.ipynb (Training):

  • To easily run it, first upload the file to the KTH cluser enviroment.

  • Create a folder called 'data' inside of the code directory and put the Reviews.csv file from the Amazon Fine Food Review dataset provided in the instruction document.

  • Run the notebook.

  • Three versions of the model will be saved as the model is training. The three latest versions of the model represent the model version from the previous 5000 iteration, 10 000 iterations and lastly 15 000 iterations. Once the training is done you find the models in the following path ./google-tf/tf-small_amazon/. You will find three checkpoint folders.

Run fine-tune-demo.ipynb (Demo):

  • To easily run it, upload the file also to the KTH cluser enviroment in the same folder of the previous file.

  • Create a folder called 'final-model'

  • You have two options, either download the folder that contains our trained model https://drive.google.com/file/d/1O13AqXfJ9bGkF02ytlW6K7fY_tXflmrC/ and copy its content to the 'final-model' folder or use a model you trained yourself by copying the content of the last checkpoint into 'final-model' folder.

  • Run the notebook and now you will be able to do inference in the last code cell.

NOTE: If you don't want to run the notebooks on the Jupyter enviroment, then you will have to install the dependencies such datasets, transformers from HuggingFace.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •