minimaxir / reactionrnn Goto Github PK
View Code? Open in Web Editor NEWPython module + R package to predict the reactions to a given text using a pretrained recurrent neural network.
License: MIT License
Python module + R package to predict the reactions to a given text using a pretrained recurrent neural network.
License: MIT License
e.g. selecting a pandas column.
Hey minimaxir, Thanks for this. Following error occurs while using reactionrnn()
:
> library(reactionrnn)
Loading required package: keras
Warning message:
package ‘keras’ was built under R version 3.4.1
> react <- reactionrnn()
Error in py_set_attr_impl(x, name, value) :
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x85 in position 0: invalid start byte
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-54-17136acf3088> in <module>()
1 from reactionrnn import reactionrnn
2
----> 3 react = reactionrnn()
\Anaconda3\lib\site-packages\reactionrnn\reactionrnn.py in __init__(self, weights_path, vocab_path)
27
28 with open(vocab_path, 'r') as json_file:
---> 29 self.vocab = json.load(json_file)
30
31 self.tokenizer = Tokenizer(filters='', char_level=True)
\Anaconda3\lib\json\__init__.py in load(fp, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
294
295 """
--> 296 return loads(fp.read(),
297 cls=cls, object_hook=object_hook,
298 parse_float=parse_float, parse_int=parse_int,
\Anaconda3\lib\encodings\cp1252.py in decode(self, input, final)
21 class IncrementalDecoder(codecs.IncrementalDecoder):
22 def decode(self, input, final=False):
---> 23 return codecs.charmap_decode(input,self.errors,decoding_table)[0]
24
25 class StreamWriter(Codec,codecs.StreamWriter):
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 79: character maps to <undefined>
Instantiating a reactionrnn()
object on the rocker/tidyverse
container:
Error in initialize_python(required_module) :
Python shared library '/usr/lib/libpython2.7.so' not found, Python bindings not loaded.
Likely a concern with the keras
package since they do shenanigans with the Python bindings.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.