mattb512 commited on
Commit
ee1ba28
1 Parent(s): fc47d3a

fix deprecated api

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. serve/gradio_web_server.py +3 -3
Dockerfile CHANGED
@@ -6,7 +6,7 @@ RUN apt-get -y update \
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
  RUN python3 -m pip install --upgrade pip \
9
- && pip install --no-cache-dir torch torchvision torchaudio gradio==4.28.2
10
  # pyyaml-include==1.4.1
11
 
12
  RUN useradd -m -u 1000 user
 
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
  RUN python3 -m pip install --upgrade pip \
9
+ && pip install --no-cache-dir torch torchvision torchaudio
10
  # pyyaml-include==1.4.1
11
 
12
  RUN useradd -m -u 1000 user
serve/gradio_web_server.py CHANGED
@@ -65,11 +65,11 @@ function() {
65
  def load_demo(url_params, request: gr.Request):
66
  # logger.info(f"load_demo. ip: {request.client.host}. params: {url_params}")
67
 
68
- dropdown_update = gr.Dropdown.update(visible=True)
69
  if "model" in url_params:
70
  model = url_params["model"]
71
  if model in models:
72
- dropdown_update = gr.Dropdown.update(value=model, visible=True)
73
 
74
  state = default_conversation.copy()
75
  return state, dropdown_update
@@ -79,7 +79,7 @@ def load_demo_refresh_model_list(request: gr.Request):
79
  # logger.info(f"load_demo. ip: {request.client.host}")
80
  models = get_model_list()
81
  state = default_conversation.copy()
82
- dropdown_update = gr.Dropdown.update(choices=models, value=models[0] if len(models) > 0 else "")
83
  return state, dropdown_update
84
 
85
 
 
65
  def load_demo(url_params, request: gr.Request):
66
  # logger.info(f"load_demo. ip: {request.client.host}. params: {url_params}")
67
 
68
+ dropdown_update = gr.Dropdown(visible=True)
69
  if "model" in url_params:
70
  model = url_params["model"]
71
  if model in models:
72
+ dropdown_update = gr.Dropdown(value=model, visible=True)
73
 
74
  state = default_conversation.copy()
75
  return state, dropdown_update
 
79
  # logger.info(f"load_demo. ip: {request.client.host}")
80
  models = get_model_list()
81
  state = default_conversation.copy()
82
+ dropdown_update = gr.Dropdown(choices=models, value=models[0] if len(models) > 0 else "")
83
  return state, dropdown_update
84
 
85