Spaces:
Sleeping
Sleeping
Merge pull request #28 from andreped/linting
Browse filesFixed linting issue; disabled app sharing by default
- demo/app.py +2 -2
- demo/src/inference.py +3 -3
demo/app.py
CHANGED
@@ -15,7 +15,7 @@ def main():
|
|
15 |
parser.add_argument(
|
16 |
"--share",
|
17 |
type=int,
|
18 |
-
default=
|
19 |
help="Whether to enable the app to be accessible online"
|
20 |
"-> setups a public link which requires internet access.",
|
21 |
)
|
@@ -30,7 +30,7 @@ def main():
|
|
30 |
"The 'share' argument can only be set to 0 or 1, but was:",
|
31 |
args.share,
|
32 |
)
|
33 |
-
|
34 |
print("Current cwd:", args.cwd)
|
35 |
|
36 |
# initialize and run app
|
|
|
15 |
parser.add_argument(
|
16 |
"--share",
|
17 |
type=int,
|
18 |
+
default=0,
|
19 |
help="Whether to enable the app to be accessible online"
|
20 |
"-> setups a public link which requires internet access.",
|
21 |
)
|
|
|
30 |
"The 'share' argument can only be set to 0 or 1, but was:",
|
31 |
args.share,
|
32 |
)
|
33 |
+
|
34 |
print("Current cwd:", args.cwd)
|
35 |
|
36 |
# initialize and run app
|
demo/src/inference.py
CHANGED
@@ -30,8 +30,8 @@ def run_model(
|
|
30 |
if os.path.exists("./result/"):
|
31 |
shutil.rmtree("./result/")
|
32 |
|
33 |
-
patient_directory =
|
34 |
-
output_path =
|
35 |
try:
|
36 |
# setup temporary patient directory
|
37 |
filename = input_path.split("/")[-1]
|
@@ -94,7 +94,7 @@ def run_model(
|
|
94 |
shutil.rmtree(patient_directory)
|
95 |
if os.path.exists(output_path):
|
96 |
shutil.rmtree(output_path)
|
97 |
-
except Exception
|
98 |
print(traceback.format_exc())
|
99 |
# Clean-up
|
100 |
if os.path.exists(patient_directory):
|
|
|
30 |
if os.path.exists("./result/"):
|
31 |
shutil.rmtree("./result/")
|
32 |
|
33 |
+
patient_directory = ""
|
34 |
+
output_path = ""
|
35 |
try:
|
36 |
# setup temporary patient directory
|
37 |
filename = input_path.split("/")[-1]
|
|
|
94 |
shutil.rmtree(patient_directory)
|
95 |
if os.path.exists(output_path):
|
96 |
shutil.rmtree(output_path)
|
97 |
+
except Exception:
|
98 |
print(traceback.format_exc())
|
99 |
# Clean-up
|
100 |
if os.path.exists(patient_directory):
|