Skip to content

Commit

Permalink
Fix R import dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
minimaxir committed Aug 17, 2017
1 parent 5d70714 commit 44c01fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion R-package/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Package: reactionrnn
Type: Package
Title: What the Package Does (Title Case)
Title: Pretrained Character-Based Neural Network For Predicting the Reaction to Given Text(s).
Version: 0.1.0
Date: 2017-08-17
Author: Max Woolf
Maintainer: Max Woolf <[email protected]>
Description: More about what it does (maybe more than one line)
Expand All @@ -10,3 +11,4 @@ License: MIT
Encoding: UTF-8
LazyData: true
Imports: keras, rjson
Depends: keras
2 changes: 1 addition & 1 deletion R-package/R/reactionrnn.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ reactionrnn <- function() {
maxlen <- 140
reactions <- c('love', 'wow', 'haha', 'sad', 'angry')
tokenizer <- text_tokenizer(filters='', char_level=T)
tokenizer$word_index <- fromJSON(file="data/reactionrnn_vocab.json")
tokenizer$word_index <- rjson::fromJSON(file="data/reactionrnn_vocab.json")
num_classes = length(tokenizer$word_index) + 1
model = reactionrnn_build("data/reactionrnn_weights.hdf5", num_classes)
model_enc = keras_model(inputs = model$input,
Expand Down

0 comments on commit 44c01fd

Please sign in to comment.