Spaces:
Runtime error
Runtime error
Commit
·
9a5d144
1
Parent(s):
1ccf34d
updated app file
Browse files
app.py
CHANGED
@@ -3,11 +3,11 @@ import tensorflow.compat.v1 as tf
|
|
3 |
tf.disable_v2_behavior()
|
4 |
#loading the saved parameters
|
5 |
def load_params():
|
6 |
-
with open('
|
7 |
return pickle.load(in_file)
|
8 |
|
9 |
def load_preprocess():
|
10 |
-
with open('
|
11 |
return pickle.load(in_file)
|
12 |
|
13 |
#getting the source and target vocabuaries
|
@@ -45,10 +45,10 @@ tf.compat.v1.Session()
|
|
45 |
with tf.compat.v1.Session(graph=loaded_graph) as sess:
|
46 |
|
47 |
# Load saved model
|
48 |
-
loader = tf.train.import_meta_graph("
|
49 |
|
50 |
# tf.train.Saver.restore(sess,load_path)
|
51 |
-
loader.restore(sess, "
|
52 |
|
53 |
#providing placeholder names from the loaded graph
|
54 |
input_data = loaded_graph.get_tensor_by_name('input:0')
|
|
|
3 |
tf.disable_v2_behavior()
|
4 |
#loading the saved parameters
|
5 |
def load_params():
|
6 |
+
with open('./params.p', mode='rb') as in_file:
|
7 |
return pickle.load(in_file)
|
8 |
|
9 |
def load_preprocess():
|
10 |
+
with open('./preprocess.p', mode='rb') as in_file:
|
11 |
return pickle.load(in_file)
|
12 |
|
13 |
#getting the source and target vocabuaries
|
|
|
45 |
with tf.compat.v1.Session(graph=loaded_graph) as sess:
|
46 |
|
47 |
# Load saved model
|
48 |
+
loader = tf.train.import_meta_graph("./dev.meta")
|
49 |
|
50 |
# tf.train.Saver.restore(sess,load_path)
|
51 |
+
loader.restore(sess, "./dev")
|
52 |
|
53 |
#providing placeholder names from the loaded graph
|
54 |
input_data = loaded_graph.get_tensor_by_name('input:0')
|