Merge pull request #327 from ataymano/ataymano/omnitool_fix

Omnitool security updates
This commit is contained in:
Alexey Taymanov
2025-08-20 15:14:46 -04:00
committed by GitHub
4 changed files with 4 additions and 4 deletions

View File

@@ -423,4 +423,4 @@ with gr.Blocks(theme=gr.themes.Default()) as demo:
stop_button.click(stop_app, [state], None) stop_button.click(stop_app, [state], None)
if __name__ == "__main__": if __name__ == "__main__":
demo.launch(server_name="0.0.0.0", server_port=7888) demo.launch(server_name="127.0.0.1", server_port=7888)

View File

@@ -757,4 +757,4 @@ with gr.Blocks(theme=gr.themes.Default()) as demo:
gr.HTML("<script>(" + js_refresh + ")();</script>") gr.HTML("<script>(" + js_refresh + ")();</script>")
if __name__ == "__main__": if __name__ == "__main__":
demo.launch(server_name="0.0.0.0", server_port=7888) demo.launch(server_name="127.0.0.1", server_port=7888)

View File

@@ -78,4 +78,4 @@ def capture_screen_with_cursor():
return send_file(img_io, mimetype='image/png') return send_file(img_io, mimetype='image/png')
if __name__ == '__main__': if __name__ == '__main__':
app.run(debug=True, host="0.0.0.0", port=args.port) app.run(host="127.0.0.1", port=args.port)

View File

@@ -20,7 +20,7 @@ def parse_arguments():
parser.add_argument('--caption_model_path', type=str, default='../../weights/icon_caption_florence', help='Path to the caption model') parser.add_argument('--caption_model_path', type=str, default='../../weights/icon_caption_florence', help='Path to the caption model')
parser.add_argument('--device', type=str, default='cpu', help='Device to run the model') parser.add_argument('--device', type=str, default='cpu', help='Device to run the model')
parser.add_argument('--BOX_TRESHOLD', type=float, default=0.05, help='Threshold for box detection') parser.add_argument('--BOX_TRESHOLD', type=float, default=0.05, help='Threshold for box detection')
parser.add_argument('--host', type=str, default='0.0.0.0', help='Host for the API') parser.add_argument('--host', type=str, default='127.0.0.1', help='Host for the API')
parser.add_argument('--port', type=int, default=8000, help='Port for the API') parser.add_argument('--port', type=int, default=8000, help='Port for the API')
args = parser.parse_args() args = parser.parse_args()
return args return args