Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Could not resolve app config when connecting to model using Gradio client in Node.js #9214

Open
1 task done
yardenxr opened this issue Aug 29, 2024 · 2 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@yardenxr
Copy link

yardenxr commented Aug 29, 2024

Describe the bug

I encountered an issue while trying to connect to the model using the @gradio/client library in a Node.js environment. The error message returned is Error: Could not resolve app config.

important to say that in python it works with the same and token.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

Install the @gradio/client library using npm:

npm install @gradio/client

Import and use the client function to connect to the model i had to use the workaround for JS (which needs a fix aswell):

export const importDynamic = new Function('modulePath', 'return import(modulePath)')
const c = async() => {
	const hf_token = 'hf_myHfToken'
	const { Client } = await importDynamic('@gradio/client')
	const app = await Client.connect('<spaceName>', { hf_token })

}
c()

Run the script in a Node.js environment.

Expected Behavior: The client should successfully connect to the model, allowing interaction with the model through the Gradio interface.

Actual Behavior: The following error is thrown:
Error: Could not resolve app config.

Screenshot

No response

Logs

No response

System Info

node version: v20.13.1
@gradio/client 1.5.1

Severity

Blocking usage of gradio

@yardenxr yardenxr added the bug Something isn't working label Aug 29, 2024
@AshRossel
Copy link

Did you find a solution?

@yardenxr
Copy link
Author

yardenxr commented Nov 9, 2024

Did you find a solution?

I just dont use gradio...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants