Hugging face space api integration
I am using wix chatbot and I need to integrate my public space API in the chat, but I am struck in creating the request payload to my API.I am not sure how to build a request pay load for the API.By using the iframe code, and ran the space with html file and analyzed it with network tab and got below.Request URL:https://MyHuggingFace space name.hf.space/gradio_api/run/predictRequest Method:POSTStatus Code:200 OKRemote Address:50.17.216.56:443Referrer Policy:strict-origin-when-cross-originAnd the request payload in the network tab was,{data: [“hi”,], event_data: null, fn_index: 0, trigger_id: 8, session_hash: “ntwomc7trv”}data: [“hi”,]event_data: nullfn_index: 0session_hash: “ntwomc7trv”trigger_id: 8Here, “hi” is the only word that i gave as input through the iframe UI, rest all attributes were automatically generated by the gradio. Now I am not sure how to fill these attributes when I am using this in my js script. is there any other format for this?
2025-01-19T05:26:24Z
Click on “Use via API” at the bottom of each space for more information.gradio.appQuerying Gradio Apps With CurlA Step-by-Step Gradio Tutorialgradio.appGetting Started With The Js ClientA Step-by-Step Gradio Tutorial
2025-01-19T17:26:58Z
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.