changed Flask to not listen on public IP
This commit is contained in:
parent
e4dc6631b5
commit
2f1ec100b2
@ -42,14 +42,11 @@ def parse_args():
|
||||
|
||||
def main(args):
|
||||
|
||||
response = requests.post("http://0.0.0.0:8080", data=open(args.pdf_path, "rb"))
|
||||
|
||||
response = requests.post("http://127.0.0.1:5000", data=open(args.pdf_path, "rb"))
|
||||
response.raise_for_status()
|
||||
|
||||
predictions = response.json()
|
||||
|
||||
print(json.dumps(predictions, indent=2))
|
||||
|
||||
annotate(args.pdf_path, predictions)
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ def main(args):
|
||||
|
||||
predictor = initialize_predictor()
|
||||
|
||||
app.run(host="0.0.0.0", port=8080)
|
||||
app.run(host="127.0.0.1", port=5000)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user