cszhzleo commited on
Commit
ee6f528
1 Parent(s): accffe2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -88,14 +88,14 @@ def ask_llm(prompt, byte_image):
88
  }
89
  }
90
  #response = requests.post(url, json=payload, headers=headers)
91
- response = smr.invoke_endpoint(
92
  EndpointName=sm_endpoint_name,
93
  Body=json.dumps(payload),
94
  ContentType="application/json",
95
  )
96
 
97
  #return response.text
98
- return response
99
 
100
  def app():
101
  st.markdown("---")
 
88
  }
89
  }
90
  #response = requests.post(url, json=payload, headers=headers)
91
+ response_model = smr.invoke_endpoint(
92
  EndpointName=sm_endpoint_name,
93
  Body=json.dumps(payload),
94
  ContentType="application/json",
95
  )
96
 
97
  #return response.text
98
+ return response_model['Body'].read().decode('utf8')
99
 
100
  def app():
101
  st.markdown("---")