FastChat icon indicating copy to clipboard operation
FastChat copied to clipboard

Error: Type object 'Dropdown' has no attribute 'update' in "qa_browser.py"

Open tanliboy opened this issue 1 year ago • 2 comments
trafficstars

Hi FastChat team,

I ran into this error while starting the qa broswer. It seems that the Dropdown::update has been removed (https://github.com/gradio-app/gradio/issues/6862), and we need update the qa_browser.py. Or did I miss something? Thanks!

  File "/home/<user>/FastChat/fastchat/llm_judge/qa_browser.py", line 356, in load_demo
    dropdown_update = gr.Dropdown.update(value=list(category_selector_map.keys())[0])
AttributeError: type object 'Dropdown' has no attribute 'update'

Li

tanliboy avatar May 17 '24 18:05 tanliboy

BTW, it seems that it can be easily fixed with

 def load_demo():
-    dropdown_update = gr.Dropdown.update(value=list(category_selector_map.keys())[0])
+    dropdown_update = gr.Dropdown(
+        value=list(category_selector_map.keys())[0], interactive=True
+    )
     return dropdown_update, dropdown_update

tanliboy avatar May 17 '24 18:05 tanliboy

Thank you, that works. Mind opening PR?

thepowerfuldeez avatar May 20 '24 13:05 thepowerfuldeez