Skip to content

Commit

Permalink
Fix key error in image retrieval payload data content
Browse files Browse the repository at this point in the history
  • Loading branch information
djwhatle committed Nov 13, 2024
1 parent a886400 commit e4e9757
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def check_config(self, config: InputsConfig) -> None:
def convert(
self, generic_dataset: GenericDataset, config: InputsConfig
) -> Dict[Any, Any]:
request_body: Dict[str, Any] = {"input": []}
request_body: Dict[str, Any] = {"data": []}

for file_data in generic_dataset.files_data.values():
for index, row in enumerate(file_data.rows):
Expand All @@ -58,7 +58,11 @@ def _create_payload(
self, row: DataRow, config: InputsConfig
) -> Dict[Any, Any]:
content = self._retrieve_content(row, config)
return content

payload = {
"input": content
}
return payload

def _retrieve_content(
self, row: DataRow, config: InputsConfig
Expand Down

0 comments on commit e4e9757

Please sign in to comment.