JohnSmith9982 commited on
Commit
2b718c8
1 Parent(s): 53127fb

Upload 38 files

Browse files
Files changed (2) hide show
  1. ChuanhuChatbot.py +1 -1
  2. modules/utils.py +1 -1
ChuanhuChatbot.py CHANGED
@@ -274,7 +274,7 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
274
 
275
  gr.Markdown(CHUANHU_DESCRIPTION, elem_id="description")
276
  gr.HTML(FOOTER.format(versions=versions_html()), elem_id="footer")
277
- demo.load(refresh_ui_elements_on_load, [current_model, model_select_dropdown], [usageTxt, like_dislike_area], show_progress=False)
278
  chatgpt_predict_args = dict(
279
  fn=predict,
280
  inputs=[
 
274
 
275
  gr.Markdown(CHUANHU_DESCRIPTION, elem_id="description")
276
  gr.HTML(FOOTER.format(versions=versions_html()), elem_id="footer")
277
+ demo.load(refresh_ui_elements_on_load, [current_model, model_select_dropdown], [like_dislike_area], show_progress=False)
278
  chatgpt_predict_args = dict(
279
  fn=predict,
280
  inputs=[
modules/utils.py CHANGED
@@ -539,7 +539,7 @@ def get_model_source(model_name, alternative_source):
539
  return "https://huggingface.co/gpt2-medium"
540
 
541
  def refresh_ui_elements_on_load(current_model, selected_model_name):
542
- return current_model.billing_info(), toggle_like_btn_visibility(selected_model_name)
543
 
544
  def toggle_like_btn_visibility(selected_model_name):
545
  if selected_model_name == "xmchat":
 
539
  return "https://huggingface.co/gpt2-medium"
540
 
541
  def refresh_ui_elements_on_load(current_model, selected_model_name):
542
+ return toggle_like_btn_visibility(selected_model_name)
543
 
544
  def toggle_like_btn_visibility(selected_model_name):
545
  if selected_model_name == "xmchat":