Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (ns graal-test.core
- (:import (org.graalvm.polyglot Context)))
- (def py-context (Context/create (into-array ["python"])))
- (.eval py-context "python" "print('Hello polyglot world Python!');")
- (.eval py-context "python" "
- import time;
- time.clock()
- ") ;=> #object[org.graalvm.polyglot.Value 0x4a6b3b70 "1.508202803249E9"]
- ;;; This is what I would love to do!!!
- (.eval py-context "python" "
- import tensorflow as tf
- hello = tf.constant('Hello, TensorFlow!')
- sess = tf.Session()
- print(sess.run(hello))
- ")
Add Comment
Please, Sign In to add comment