ProfessorLeVesseur commited on
Commit
c082e41
·
verified ·
1 Parent(s): dbe5bdc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -235,8 +235,8 @@ if uploaded_file is not None and analyze_button:
235
  if isinstance(caption_response, dict) and caption_response.get("error"):
236
  st.error(f"Error with image captioning model: {caption_response['error']}")
237
  else:
238
- # Extract the generated caption
239
- image_caption = caption_response[0]['generated_text']
240
 
241
  # Use the complex image prompt text
242
  prompt_text = complex_image_prompt_text
 
235
  if isinstance(caption_response, dict) and caption_response.get("error"):
236
  st.error(f"Error with image captioning model: {caption_response['error']}")
237
  else:
238
+ # Since caption_response is a string, assign it directly
239
+ image_caption = caption_response
240
 
241
  # Use the complex image prompt text
242
  prompt_text = complex_image_prompt_text