Open bnaman50 opened 4 weeks ago
Hi @bnaman50
Yes, I have the same issue.
I think that another solution would be to modify the code in src/evaluate/utils/gradio.py to change the syntax of the depreciated gr.inputs and gr.outputs to use the interface components directly. For maintaining current available evaluate metrics, the implementation can differ based on the version (an if statement would do).
Context: I noticed this issue when I was working on submitting my own metric to the hub. At the top of the page, it keeps on asking me to update the Gradio version.
Error: Upon updating it, I got the following error -
AttributeError: module 'gradio' has no attribute 'inputs'
.Reason: Upon further digging, I think the issue is occurs whenever you upgrade Gradio to version
>=4.0
. Turns out from version 4 onwards,gradio.inputs
has been removed as you can see in the__init__
file. However,evaluate
library calls it inlaunch_gradio_widget
function inutils
dir.Solution: A simple solution would be to limit the dependency below Gradio version 4.0.0. This can be done by simply updating the line 63 in
setup.py
file. More specifically, instead of -"gradio>=3.0.0"
, it can be chnaged to"gradio>=3.0.0, <4.0.0"
to fix the issue.P.S. - I am still working on the metric so the page might go down until I fully complete it.