API-endpoint Error. Importance: High

#22
by Rupnil - opened

I am also having the error when running the mentioned code. I honestly have no idea, but I found this code:
https://cdn-uploads.huggingface.co/production/uploads/647033179ba7aeaacb28656a/uy56Q8kluC3V638CvOv2F.png

from gradio_client import Client

client = Client("https://huggingfaceh4-falcon-chat.hf.space/", serialize=False)
result = client.predict(
"Good morning!", # str in 'Type an input and press Enter' Textbox component
[["hi", "Howdy!"]], # str (filepath to JSON file) in 'parameter_9' Chatbot component
"The following is a conversation between a highly knowledgeable and intelligent AI assistant, called Falcon, and a human user, called User. In the following interactions, User and Falcon will converse in natural language, and Falcon will answer User's questions. Falcon was built to be respectful, polite and inclusive. Falcon was built by the Technology Innovation Institute in Abu Dhabi. Falcon will never decline to answer a question, and always attempts to give an answer that User would be satisfied with. It knows a lot, and always tells the truth. The conversation begins.", # str in 'Instructions' Textbox component
0.1, # int | float (numeric value between 0.1 and 2.0) in 'Temperature' Slider component
0.1, # int | float (numeric value between 0.1 and 0.99) in 'p (nucleus sampling)' Slider component
fn_index=1,
)
print(result)

  • When running this code it actually prints the chat BUT the function is returning only this [['Good morning!', 'Good']], because the function returns every word and not the whole thing so after writing only 1 word it stops. If you can find a solution please let me know. Thank you
Rupnil changed discussion status to closed

Sign up or log in to comment