nyonyong commited on
Commit
e285fc9
1 Parent(s): cf12374

Directory fix

Browse files
Files changed (1) hide show
  1. process.py +9 -3
process.py CHANGED
@@ -20,17 +20,23 @@ def clearDir():
20
 
21
  if os.path.isfile(user_input):
22
  os.remove(user_input)
23
- return 'user input clear'
 
 
24
 
25
  #cropped_img_path = "/runs/detect/" + cropped_img_folder_name
26
  if os.path.isdir(crops):
27
  shutil.rmtree(crops) #'/runs/detect/user_output'
28
- return 'crop folder clear'
 
 
29
 
30
  #txt_file_path = "/log_demo_result.txt"
31
  if os.path.isfile(result):
32
  os.remove(result)
33
- return 'result clear'
 
 
34
 
35
  def textDetection(im):
36
 
 
20
 
21
  if os.path.isfile(user_input):
22
  os.remove(user_input)
23
+ return print('Message: user input clear')
24
+ else:
25
+ print('Message: no user input')
26
 
27
  #cropped_img_path = "/runs/detect/" + cropped_img_folder_name
28
  if os.path.isdir(crops):
29
  shutil.rmtree(crops) #'/runs/detect/user_output'
30
+ return print('Message: crop folder clear')
31
+ else:
32
+ print('Message: no crop folder')
33
 
34
  #txt_file_path = "/log_demo_result.txt"
35
  if os.path.isfile(result):
36
  os.remove(result)
37
+ return print('Message: result clear')
38
+ else:
39
+ print('Message: no result')
40
 
41
  def textDetection(im):
42