Skip to content

Commit 5eee27d

Browse files
committed
Use consistent quotes
1 parent c9b021e commit 5eee27d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/py/label_dir.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@
1313
from shutil import copyfile
1414
from os.path import isfile, join
1515
var_path = '/toScan'
16-
dest_dir = "/scanned"
16+
dest_dir = '/scanned'
1717
img_files = [f for f in listdir(var_path) if isfile(join(var_path, f))]
1818

1919

2020
# Loads label file, strips off carriage return
2121
label_lines = [line.rstrip() for line
22-
in tf.gfile.GFile("/tf_files/retrained_labels.txt")]
22+
in tf.gfile.GFile('/tf_files/retrained_labels.txt')]
2323

2424
# Unpersists graph from file
25-
with tf.gfile.FastGFile("/tf_files/retrained_graph.pb", 'rb') as f:
25+
with tf.gfile.FastGFile('/tf_files/retrained_graph.pb', 'rb') as f:
2626
graph_def = tf.GraphDef()
2727
graph_def.ParseFromString(f.read())
2828
_ = tf.import_graph_def(graph_def, name='')
@@ -47,7 +47,7 @@
4747
top_k = predictions[0].argsort()[-len(predictions[0]):][::-1]
4848
firstElt = top_k[0];
4949

50-
new_file_name = label_lines[firstElt] +"--"+ str(predictions[0][firstElt])[2:7]+".jpg"
50+
new_file_name = label_lines[firstElt] +'--'+ str(predictions[0][firstElt])[2:7]+'.jpg'
5151
print(new_file_name)
5252
copyfile(join(var_path, image_file), join(dest_dir, new_file_name))
5353

0 commit comments

Comments
 (0)