Fahimeh Orvati Nia
commited on
Commit
·
7613956
1
Parent(s):
91a7a12
update the wrapper.py
Browse files- wrapper.py +3 -4
wrapper.py
CHANGED
|
@@ -18,9 +18,8 @@ def run_pipeline_on_image(input_image_path: str, work_dir: str, save_artifacts:
|
|
| 18 |
work = Path(work_dir)
|
| 19 |
work.mkdir(parents=True, exist_ok=True)
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
|
| 23 |
-
shutil.copy(input_image_path, input_copy)
|
| 24 |
|
| 25 |
# Build in-memory config pointing input/output to the working directory
|
| 26 |
cfg = Config()
|
|
@@ -34,7 +33,7 @@ def run_pipeline_on_image(input_image_path: str, work_dir: str, save_artifacts:
|
|
| 34 |
# Run the pipeline (single image minimal demo)
|
| 35 |
os.environ['MINIMAL_DEMO'] = '1'
|
| 36 |
os.environ['FAST_OUTPUT'] = '1'
|
| 37 |
-
results = pipeline.run(single_image_path=str(
|
| 38 |
|
| 39 |
# Collect outputs
|
| 40 |
outputs: Dict[str, str] = {}
|
|
|
|
| 18 |
work = Path(work_dir)
|
| 19 |
work.mkdir(parents=True, exist_ok=True)
|
| 20 |
|
| 21 |
+
# Use input path directly (already in work_dir from app.py)
|
| 22 |
+
input_path = Path(input_image_path)
|
|
|
|
| 23 |
|
| 24 |
# Build in-memory config pointing input/output to the working directory
|
| 25 |
cfg = Config()
|
|
|
|
| 33 |
# Run the pipeline (single image minimal demo)
|
| 34 |
os.environ['MINIMAL_DEMO'] = '1'
|
| 35 |
os.environ['FAST_OUTPUT'] = '1'
|
| 36 |
+
results = pipeline.run(single_image_path=str(input_path))
|
| 37 |
|
| 38 |
# Collect outputs
|
| 39 |
outputs: Dict[str, str] = {}
|