The custom component fails to load when running the Gradio app, displaying an error message on the console and a loading screen on the UI. The app is stuck in the loading state with the following message: "Loading... If your custom component never loads, consult the troubleshooting guide."
Have you searched existing issues? ๐
[X] I have searched and found no existing issues
Reproduction
import gradio as gr
from gradio_mycomponent import MyComponent
example = MyComponent().example_value()
demo = gr.Interface(
lambda x:x,
MyComponent(), # interactive version of your component
MyComponent(), # static version of your component
# examples=[[example]], # uncomment this line to view the "example version" of your component
)
if __name__ == "__main__":
demo.launch()
Screenshot
Logs
No response
System Info
Gradio Environment Information:
------------------------------
Operating System: Windows
gradio version: 4.42.0
gradio_client version: 1.3.0
------------------------------------------------
gradio dependencies in your environment:
aiofiles: 23.2.1
anyio: 4.2.0
fastapi: 0.112.2
ffmpy: 0.4.0
gradio-client==1.3.0 is not installed.
huggingface-hub: 0.24.6
importlib-resources: 6.4.4
jinja2: 3.1.4
markupsafe: 2.1.3
matplotlib: 3.8.4
numpy: 1.26.4
orjson: 3.10.7
packaging: 23.2
pandas: 2.2.2
pillow: 10.3.0
pydantic: 2.5.3
pydub: 0.25.1
python-multipart: 0.0.9
pyyaml: 6.0.1
ruff: 0.6.3
semantic-version: 2.10.0
tomlkit==0.12.0 is not installed.
typer: 0.12.5
typing-extensions: 4.11.0
urllib3: 2.2.2
uvicorn: 0.30.6
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.
gradio_client dependencies in your environment:
fsspec: 2024.3.1
httpx: 0.27.0
huggingface-hub: 0.24.6
packaging: 23.2
typing-extensions: 4.11.0
websockets: 12.0
Hi @oreoluwa212 - can you please pass in the --python-path argument? It should be the path to the python interpreter in the environment your component was installed in.
Describe the bug
Have you searched existing issues? ๐
Reproduction
Screenshot
Logs
No response
System Info
Severity
Blocking usage of gradio