gskdsrikrishna commited on
Commit
cb0751e
·
verified ·
1 Parent(s): df0a6c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -27,7 +27,7 @@ if st.button("Extract Head"):
27
  result = extract_head(uploaded_file)
28
 
29
  # Extract image URL from JSON response
30
- head_url = result.get("message", {}).get("head_image_url")
31
  if head_url:
32
  st.image(head_url, caption="Extracted Head", use_container_width=True)
33
 
@@ -42,4 +42,4 @@ if st.button("Extract Head"):
42
  st.error("Failed to extract head. No image URL found in response.")
43
  st.write("Response Data:", result) # Debugging: Show response data
44
  else:
45
- st.warning("Please upload an image.")
 
27
  result = extract_head(uploaded_file)
28
 
29
  # Extract image URL from JSON response
30
+ head_url = result.get("imageURL")
31
  if head_url:
32
  st.image(head_url, caption="Extracted Head", use_container_width=True)
33
 
 
42
  st.error("Failed to extract head. No image URL found in response.")
43
  st.write("Response Data:", result) # Debugging: Show response data
44
  else:
45
+ st.warning("Please upload an image.")