@@ -238,7 +238,7 @@ async def run_custom_agent(
238
238
"Ocean" : Ocean ()
239
239
}
240
240
241
- def create_ui ():
241
+ def create_ui (theme_name = "Ocean" ):
242
242
"""Create the UI with the specified theme"""
243
243
# Enhanced styling for better visual appeal
244
244
css = """
@@ -258,7 +258,7 @@ def create_ui():
258
258
}
259
259
"""
260
260
261
- with gr .Blocks (title = "Browser Use WebUI" , theme = theme_map ["Ocean" ], css = css ) as demo :
261
+ with gr .Blocks (title = "Browser Use WebUI" , theme = theme_map [theme_name ], css = css ) as demo :
262
262
with gr .Row ():
263
263
gr .Markdown (
264
264
"""
@@ -294,7 +294,7 @@ def create_ui():
294
294
with gr .TabItem ("🔧 LLM Configuration" , id = 2 ):
295
295
with gr .Group ():
296
296
llm_provider = gr .Dropdown (
297
- ["anthropic" , "openai" , "gemini" , "azure_openai" , "deepseek" , "" ],
297
+ ["anthropic" , "openai" , "gemini" , "azure_openai" , "deepseek" ],
298
298
label = "LLM Provider" ,
299
299
value = "gemini" ,
300
300
info = "Select your preferred language model provider"
@@ -457,9 +457,11 @@ def main():
457
457
parser = argparse .ArgumentParser (description = "Gradio UI for Browser Agent" )
458
458
parser .add_argument ("--ip" , type = str , default = "127.0.0.1" , help = "IP address to bind to" )
459
459
parser .add_argument ("--port" , type = int , default = 7788 , help = "Port to listen on" )
460
+ parser .add_argument ("--theme" , type = str , default = "Citrus" , choices = theme_map .keys (), help = "Theme to use for the UI" )
460
461
args = parser .parse_args ()
461
462
462
- demo = create_ui ()
463
+ # Create the UI with the specified theme
464
+ demo = create_ui (theme_name = args .theme )
463
465
demo .launch (server_name = args .ip , server_port = args .port )
464
466
465
467
if __name__ == '__main__' :
0 commit comments