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

How to use the API with gradio #424

Open
clemtttt opened this issue Feb 22, 2024 · 0 comments
Open

How to use the API with gradio #424

clemtttt opened this issue Feb 22, 2024 · 0 comments

Comments

@clemtttt
Copy link

clemtttt commented Feb 22, 2024

Hi,
Im running musicgen with Gradio but I can't use the API to generate a song from a texte.

I use this code but I always have errors regarding the wrong data used

`from gradio_client import Client
import os

client = Client("http://13.43.27.33:7862/")
result = client.predict(
"Piano ballad", # text description
None,
fn_index=0,
)

print(result)
`

Can you help me to find to good code to use the API with gradio ? Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant