Is it avalible for calling api?

#3
by ohmygod0193 - opened

I test the code from "Use via api", but i always get "FileNotFoundError: [Errno 2] No such file or directory: 'null'", how can i fix it?

from gradio_client import Client

client = Client("https://yentinglin-taiwan-llama2.hf.space/")
result = client.predict(
"null", # str (filepath to JSON file) in 'parameter_2' Chatbot component
1, # int | float (numeric value between 1 and 4096) in 'Max new tokens' Slider component
0.1, # int | float (numeric value between 0.1 and 1.0) in 'Temperature' Slider component
0.05, # int | float (numeric value between 0.05 and 1.0) in 'Top-p (nucleus sampling)' Slider component
1, # int | float (numeric value between 1 and 1000) in 'Top-k' Slider component
"Howdy!", # str in 'System prompt' Textbox component
fn_index=1
)
print(result)

There is no public api

yentinglin changed discussion status to closed

Sign up or log in to comment