Spaces:
Runtime error
Runtime error
nyonyong
commited on
Commit
·
ac5854a
1
Parent(s):
e285fc9
Directory fix\
Browse files- process.py +3 -3
process.py
CHANGED
|
@@ -20,21 +20,21 @@ def clearDir():
|
|
| 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 |
|
|
|
|
| 20 |
|
| 21 |
if os.path.isfile(user_input):
|
| 22 |
os.remove(user_input)
|
| 23 |
+
return print('Message: user input clear - {}', os.path.isfile(user_input))
|
| 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 - {}', os.path.isdir(crops))
|
| 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 - {}', os.path.isfile(result))
|
| 38 |
else:
|
| 39 |
print('Message: no result')
|
| 40 |
|