Skip to content

Commit

Permalink
Add allowed_paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jhj0517 committed Dec 22, 2024
1 parent 1513973 commit a328197
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ def launch(self):
ssl_verify=args.ssl_verify,
ssl_keyfile=args.ssl_keyfile,
ssl_keyfile_password=args.ssl_keyfile_password,
ssl_certfile=args.ssl_certfile
ssl_certfile=args.ssl_certfile,
allowed_paths=eval(args.allowed_paths) if args.allowed_paths else None
)

@staticmethod
Expand Down Expand Up @@ -333,6 +334,7 @@ def on_change_models(model_size: str):
parser.add_argument('--colab', type=str2bool, default=False, nargs='?', const=True, help='Is colab user or not')
parser.add_argument('--api_open', type=str2bool, default=False, nargs='?', const=True,
help='Enable api or not in Gradio')
parser.add_argument('--allowed_paths', type=str, default=None, help='Gradio allowed paths')
parser.add_argument('--inbrowser', type=str2bool, default=True, nargs='?', const=True,
help='Whether to automatically start Gradio app or not')
parser.add_argument('--ssl_verify', type=str2bool, default=True, nargs='?', const=True,
Expand Down

0 comments on commit a328197

Please sign in to comment.