Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
FileNotFoundError: [Errno 2] No such file or directory: 'null'
#300
by
Nasa1423
- opened
Hello!
Trying to use API for leaderboard space with fn_index=1, using this code:
client = Client("https://huggingfaceh4-open-llm-leaderboard.hf.space/")
result = client.predict(
"null", # str (filepath to JSON file) in 'parameter_23' Dataframe component
"null", # str (filepath to JSON file) in 'parameter_22' Dataframe component
["Average ⬆️"], # List[str] in 'Select columns to show' Checkboxgroup component
["🟢 pretrained"], # List[str] in 'Model types' Checkboxgroup component
["torch.float16"], # List[str] in 'Precision' Checkboxgroup component
["Unknown"], # List[str] in 'Model sizes' Checkboxgroup component
True, # bool in 'Show gated/private/deleted models' Checkbox component
"Howdy!", # str in 'parameter_8' Textbox component
fn_index=1
)
print(result)
But I am facing a problem with "null" file path to JSON, script is returning error FileNotFoundError: [Errno 2] No such file or directory: 'null'.
What should I pass as "null" param?
Hi, the arguments that are marked as filepath to JSON file
should be actual pandas dataframes as they are all linked to the function update_table
defined in app.py
, I'm not sure this function is able to return the result you want.
I agree with
@SaylorTwift
.
Btw, you can take a look at the Resources that the community created (it's a pinned discussion), as I'm quite sure some of them use this API - maybe it will be clearer to use if you look at examples.
Best of luck!
clefourrier
changed discussion status to
closed