Spaces:
Running
Running
wimg
commited on
Commit
·
409297c
1
Parent(s):
c597752
add root_path argument (essential when reverse proxying on a url+prefix)
Browse files
app.py
CHANGED
|
@@ -333,6 +333,8 @@ class App:
|
|
| 333 |
launch_args['server_port'] = self.args.server_port
|
| 334 |
if self.args.username and self.args.password:
|
| 335 |
launch_args['auth'] = (self.args.username, self.args.password)
|
|
|
|
|
|
|
| 336 |
launch_args['inbrowser'] = True
|
| 337 |
|
| 338 |
self.app.queue(api_open=False).launch(**launch_args)
|
|
@@ -344,6 +346,7 @@ parser.add_argument('--whisper_type', type=str, default="faster-whisper", help='
|
|
| 344 |
parser.add_argument('--share', type=bool, default=False, nargs='?', const=True, help='Gradio share value')
|
| 345 |
parser.add_argument('--server_name', type=str, default=None, help='Gradio server host')
|
| 346 |
parser.add_argument('--server_port', type=int, default=None, help='Gradio server port')
|
|
|
|
| 347 |
parser.add_argument('--username', type=str, default=None, help='Gradio authentication username')
|
| 348 |
parser.add_argument('--password', type=str, default=None, help='Gradio authentication password')
|
| 349 |
parser.add_argument('--theme', type=str, default=None, help='Gradio Blocks theme')
|
|
|
|
| 333 |
launch_args['server_port'] = self.args.server_port
|
| 334 |
if self.args.username and self.args.password:
|
| 335 |
launch_args['auth'] = (self.args.username, self.args.password)
|
| 336 |
+
if self.args.root_path:
|
| 337 |
+
launch_args['root_path'] = self.args.root_path
|
| 338 |
launch_args['inbrowser'] = True
|
| 339 |
|
| 340 |
self.app.queue(api_open=False).launch(**launch_args)
|
|
|
|
| 346 |
parser.add_argument('--share', type=bool, default=False, nargs='?', const=True, help='Gradio share value')
|
| 347 |
parser.add_argument('--server_name', type=str, default=None, help='Gradio server host')
|
| 348 |
parser.add_argument('--server_port', type=int, default=None, help='Gradio server port')
|
| 349 |
+
parser.add_argument('--root_path', type=str, default=None, help='Gradio root path')
|
| 350 |
parser.add_argument('--username', type=str, default=None, help='Gradio authentication username')
|
| 351 |
parser.add_argument('--password', type=str, default=None, help='Gradio authentication password')
|
| 352 |
parser.add_argument('--theme', type=str, default=None, help='Gradio Blocks theme')
|