Spaces:
Running
Running
jhj0517
commited on
Commit
•
0f16dda
1
Parent(s):
d7f2438
added new command argument theme
Browse files- app.py +2 -1
- user-start-webui.bat +5 -1
app.py
CHANGED
@@ -11,7 +11,7 @@ from modules.youtube_manager import get_ytmetas
|
|
11 |
class App:
|
12 |
def __init__(self, args):
|
13 |
self.args = args
|
14 |
-
self.app = gr.Blocks(css=CSS)
|
15 |
self.whisper_inf = WhisperInference()
|
16 |
self.nllb_inf = NLLBInference()
|
17 |
|
@@ -169,6 +169,7 @@ parser.add_argument('--server_name', type=str, default=None, help='Gradio server
|
|
169 |
parser.add_argument('--server_port', type=int, default=None, help='Gradio server port')
|
170 |
parser.add_argument('--username', type=str, default=None, help='Gradio authentication username')
|
171 |
parser.add_argument('--password', type=str, default=None, help='Gradio authentication password')
|
|
|
172 |
_args = parser.parse_args()
|
173 |
|
174 |
if __name__ == "__main__":
|
|
|
11 |
class App:
|
12 |
def __init__(self, args):
|
13 |
self.args = args
|
14 |
+
self.app = gr.Blocks(css=CSS, theme=self.args.theme)
|
15 |
self.whisper_inf = WhisperInference()
|
16 |
self.nllb_inf = NLLBInference()
|
17 |
|
|
|
169 |
parser.add_argument('--server_port', type=int, default=None, help='Gradio server port')
|
170 |
parser.add_argument('--username', type=str, default=None, help='Gradio authentication username')
|
171 |
parser.add_argument('--password', type=str, default=None, help='Gradio authentication password')
|
172 |
+
parser.add_argument('--theme', type=str, default=None, help='Gradio Blocks theme')
|
173 |
_args = parser.parse_args()
|
174 |
|
175 |
if __name__ == "__main__":
|
user-start-webui.bat
CHANGED
@@ -7,6 +7,7 @@ set SERVER_PORT=
|
|
7 |
set USERNAME=
|
8 |
set PASSWORD=
|
9 |
set SHARE=
|
|
|
10 |
|
11 |
:: Set args accordingly
|
12 |
if not "%SERVER_NAME%"=="" (
|
@@ -24,7 +25,10 @@ if not "%PASSWORD%"=="" (
|
|
24 |
if /I "%SHARE%"=="true" (
|
25 |
set SHARE_ARG=--share
|
26 |
)
|
|
|
|
|
|
|
27 |
|
28 |
:: Call the original .bat script with optional arguments
|
29 |
-
start-webui.bat %SERVER_NAME_ARG% %SERVER_PORT_ARG% %USERNAME_ARG% %PASSWORD_ARG% %SHARE_ARG%
|
30 |
pause
|
|
|
7 |
set USERNAME=
|
8 |
set PASSWORD=
|
9 |
set SHARE=
|
10 |
+
set THEME=
|
11 |
|
12 |
:: Set args accordingly
|
13 |
if not "%SERVER_NAME%"=="" (
|
|
|
25 |
if /I "%SHARE%"=="true" (
|
26 |
set SHARE_ARG=--share
|
27 |
)
|
28 |
+
if not "%THEME%"=="" (
|
29 |
+
set THEME_ARG=--theme %THEME%
|
30 |
+
)
|
31 |
|
32 |
:: Call the original .bat script with optional arguments
|
33 |
+
start-webui.bat %SERVER_NAME_ARG% %SERVER_PORT_ARG% %USERNAME_ARG% %PASSWORD_ARG% %SHARE_ARG% %THEME_ARG%
|
34 |
pause
|