MiniGPT-4 icon indicating copy to clipboard operation
MiniGPT-4 copied to clipboard

Could not find \'data\' key in response , MiniGpt v2

Open KareemHussen opened this issue 1 year ago • 1 comments

Hello,

When attempting to use gradio_client as explained in the documentation, it gives an error with the message: "error: Input should be a valid dictionary or object to extract fields from."

KeyError: 'Could not find 'data' key in response. Response received: {'detail': [{'type': 'model_attributes_type', 'loc': ['body'], 'msg': 'Input should be a valid dictionary or object to extract fields from', 'input': '{"data": [{}, "data:image/png;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPIGAM9AQMqGcG9S+0pCZbEhAAOw=="], "fn_index": 6, "session_hash": "b8ce0bd8-cd4f-4276-aef6-d16924aec11c"}', 'url': 'https://errors.pydantic.dev/2.6/v/model_attributes_type'}]}'

image

Here's my code:

image

Note that I'm using v2 because I also had problems with v1 of the Gradio client.

help plz

KareemHussen avatar Feb 26 '24 14:02 KareemHussen

Hello, have you resolved this issue? I'm encountering the same problem now.

Volibear1234 avatar Aug 19 '24 13:08 Volibear1234