Browse Source

cleaned up paths

bscheibel 4 years ago
parent
commit
070f44521b
1 changed files with 1 additions and 8 deletions
  1. 1 8
      main.py

+ 1 - 8
main.py

@@ -8,21 +8,14 @@ import redis
 import sys
 
 def write_redis(uuid, result, db_params):
-    #db = redis.Redis(unix_socket_path='/tmp/redis.sock',db=7)
-    db = redis.Redis("localhost")
+    db = redis.Redis(db_params)
     db.set(uuid, result)
 
 
 def main(uuid, filepath, db, eps):
-    #db = redis.ConnectionPool(connection_class=redis.UnixDomainSocketConnection, path="/tmp/redis.sock")
-
-    #db  = redis.Redis(unix_socket_path='/tmp/redis.sock')
-
-
     #path = "/home/centurio/Projects/engineering_drawings_extraction"
     path = "/home/bscheibel/PycharmProjects/engineering_drawings_extraction"
     filename = order_bounding_boxes_in_each_block.pdf_to_html(uuid, filepath, path)
-    #print(filename)
     result, number_blocks, number_words= order_bounding_boxes_in_each_block.get_bound_box(filename)  ##get coordinates+text out of html file into array of arrays
     print("words:" + str(number_words),"blocks:" + str(number_blocks))
     if eps == '0':