Skip to content

Commit 02e0a0e

Browse files
committed
fix: fix path error when inputing a url
1 parent 7a871ef commit 02e0a0e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

rapid_table/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
RapidTableOutput,
2020
get_boxes_recs,
2121
import_package,
22+
is_url,
2223
)
2324

2425
logger = Logger(logger_name=__name__).get_log()
@@ -149,7 +150,7 @@ def main(arg_list: Optional[List[str]] = None):
149150
print(table_results.pred_html)
150151

151152
if args.vis:
152-
save_dir = Path(img_path).resolve().parent
153+
save_dir = Path(".") if is_url(img_path) else Path(img_path).resolve().parent
153154
table_results.vis(save_dir, save_name=Path(img_path).stem)
154155

155156

0 commit comments

Comments
 (0)