API - How to use? | Priority: 🔴HIGH🔴

#9
by Rupnil - opened

Greetings! I was wondering how can I use the API?

i tried the following code but as u would expect I failed miserably:

from gradio_client import Client

client = Client("https://artificialguybr-qwen-14b-chat-demo.hf.space/", serialize=True)
result = client.predict(
                "Howdy!",	# str in 'Input' Textbox component
                None,	# str (filepath to JSON file) in 'Qwen-Chat' Chatbot component
                fn_index=0
)
print(result)
Rupnil changed discussion title from API - How to use? to API - How to use? | Priority: 🔴HIGH🔴

I dont know. Never used that API. You should check the docs.

I dont know. Never used that API. You should check the docs.

Where is the docs??

use nodejs, here the docs how to use gradio
https://www.gradio.app/guides/getting-started-with-the-js-client

use nodejs, here the docs how to use gradio
https://www.gradio.app/guides/getting-started-with-the-js-client

alr thx!

Sign up or log in to comment