maxiaolong03 commited on
Commit
8f64cf5
·
1 Parent(s): 9de4aae
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -64,11 +64,11 @@ def get_args() -> argparse.Namespace:
64
  "--model_map",
65
  type=str,
66
  default="""{
67
- "ernie-4.5-turbo-128k": "https://qianfan.baidubce.com/v2",
68
- "ernie-4.5-turbo-32k": "https://qianfan.baidubce.com/v2",
69
- "ernie-4.5-8k-preview": "https://qianfan.baidubce.com/v2",
70
- "ernie-4.5-turbo-vl-32k": "https://qianfan.baidubce.com/v2",
71
- "ernie-4.5-turbo-vl-32k-preview": "https://qianfan.baidubce.com/v2"
72
  }""",
73
  help="""JSON string defining model name to endpoint mappings.
74
  Required Format:
@@ -388,7 +388,7 @@ class GradioEvents(object):
388
  Returns:
389
  gr.update: An update object representing the visibility of the file button.
390
  """
391
- return gr.update(visible=model_name.startswith(MULTI_MODEL_PREFIX)) # file_btn
392
 
393
 
394
  def launch_demo(args: argparse.Namespace, bot_client: BotClient):
 
64
  "--model_map",
65
  type=str,
66
  default="""{
67
+ "ernie-4.5-turbo-128k-preview": "https://qianfan.baidubce.com/v2",
68
+ "ernie-4.5-21b-a3b": "https://qianfan.baidubce.com/v2",
69
+ "ernie-4.5-0.3b": "https://qianfan.baidubce.com/v2",
70
+ "ernie-4.5-turbo-vl-preview": "https://qianfan.baidubce.com/v2",
71
+ "ernie-4.5-vl-28b-a3b": "https://qianfan.baidubce.com/v2"
72
  }""",
73
  help="""JSON string defining model name to endpoint mappings.
74
  Required Format:
 
388
  Returns:
389
  gr.update: An update object representing the visibility of the file button.
390
  """
391
+ return gr.update(visible='vl' in model_name) # file_btn
392
 
393
 
394
  def launch_demo(args: argparse.Namespace, bot_client: BotClient):