mirror of
https://github.com/qurator-spk/page2tsv.git
synced 2025-06-15 22:39:54 +02:00
disable proxy option in find-entities
This commit is contained in:
parent
c7f4b6fe53
commit
9fe35377e3
1 changed files with 5 additions and 1 deletions
6
cli.py
6
cli.py
|
@ -305,7 +305,11 @@ def page2tsv(page_xml_file, tsv_out_file, image_url, ner_rest_endpoint, ned_rest
|
||||||
@click.option('--ned-rest-endpoint', type=str, default=None,
|
@click.option('--ned-rest-endpoint', type=str, default=None,
|
||||||
help="REST endpoint of sbb_ned service. See https://github.com/qurator-spk/sbb_ned for details.")
|
help="REST endpoint of sbb_ned service. See https://github.com/qurator-spk/sbb_ned for details.")
|
||||||
@click.option('--ned-json-file', type=str, default=None)
|
@click.option('--ned-json-file', type=str, default=None)
|
||||||
def find_entities(tsv_file, tsv_out_file, ner_rest_endpoint, ned_rest_endpoint, ned_json_file):
|
@click.option('--noproxy', type=bool, is_flag=True, help='disable proxy. default: proxy is enabled.')
|
||||||
|
def find_entities(tsv_file, tsv_out_file, ner_rest_endpoint, ned_rest_endpoint, ned_json_file, noproxy):
|
||||||
|
|
||||||
|
if noproxy:
|
||||||
|
os.environ['no_proxy'] = '*'
|
||||||
|
|
||||||
tsv = pd.read_csv(tsv_file, sep='\t', comment='#', quoting=3)
|
tsv = pd.read_csv(tsv_file, sep='\t', comment='#', quoting=3)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue