Skip to content

Commit

Permalink
add better documentation for examples
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanchhatpar committed May 18, 2020
1 parent 5eeef53 commit 6a6b8b7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
![Python package](https://github.com/pavanchhatpar/copynet-tf/workflows/Python%20package/badge.svg)
![Upload Python Package](https://github.com/pavanchhatpar/copynet-tf/workflows/Upload%20Python%20Package/badge.svg)

## Environment to run examples
## Run the examples
- It is recommended to run examples using the package
- Instructions to run an example are detailed in its own folders respectively
- The example has a Google colab link for end-to-end demo on running with
package and source as well.
- Refer next section to setup the local environment only if running via source

## Environment to run examples from source
### Setup
- Copy `sample.env` to `.env` and enter appropriate values for the variables
- A brief description of each is provided as a comment in that file
Expand Down Expand Up @@ -50,9 +57,6 @@
- It is recommended to run the examples in this environment to ensure all
correct dependencies are met
## Run examples
- Instructions to run an example are detailed in its own folders respectively
## References
- Incorporating Copying Mechanism in Sequence-to-Sequence Learning: ([paper](https://arxiv.org/abs/1603.06393))
- AllenNLP implementation: ([blog](https://medium.com/@epwalsh10/incorporating-a-copy-mechanism-into-sequence-to-sequence-models-40917280b89d)) ([code](https://github.com/epwalsh/nlp-models))
Expand Down
12 changes: 9 additions & 3 deletions examples/greetings/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## Greetings dataset
# Greetings dataset

## Google Colab link (Recommended)
- [Running with the package](https://colab.research.google.com/drive/1fztwQ7baqrLhaKGnL4v_p_SjCP0yVESI?usp=sharing) (Recommended method)
- [Running from source](https://colab.research.google.com/drive/1by8Ob-6JVN9_RSuDFEKAwJYOHIgPnN4f?usp=sharing)


## Refer only when running locally
### Pre-requisites
You should have the environment already setup as detailed in the main README

Expand All @@ -17,5 +23,5 @@ python preprocess.py
Refer `train.ipynb`

#### Output format
- Top 3 sequences are printed for each example as beam width is set to 3
- Its log probability is seen printed next to it
- Top n sequences are printed for each example as per the beam width set
- Its probability is seen printed next to it

0 comments on commit 6a6b8b7

Please sign in to comment.