ProfessorLeVesseur commited on
Commit
d83bda5
·
verified ·
1 Parent(s): 0978c0b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -29,7 +29,9 @@ if uploaded_file:
29
  st.image(uploaded_file, caption=uploaded_file.name, width=image_width, use_column_width=False)
30
 
31
  # Toggle for showing additional details input
32
- show_details = st.toggle("Add details about the image", value=False)
 
 
33
 
34
  if show_details:
35
  # Text input for additional details about the image, shown only if toggle is True
@@ -51,7 +53,8 @@ if uploaded_file is not None and analyze_button:
51
  # Optimized prompt for additional clarity and detail
52
  prompt_text = (
53
  "As an expert in image accessibility and alternative text, succinctly describe the image provided in less than 150 characters. "
54
- "Focus on capturing the essence and key elements of the image in three or fewer clear and concise sentences for use as alt text."
 
55
  "Your description should form a clear, well-structured, and factual paragraph that avoids bullet points, focusing on creating a seamless narrative that serves as effective alternative text for accessibility purposes."
56
  )
57
 
 
29
  st.image(uploaded_file, caption=uploaded_file.name, width=image_width, use_column_width=False)
30
 
31
  # Toggle for showing additional details input
32
+ show_details = st.toggle("Optional: Add details about the image."
33
+ "The details should reflect why the image is being used."
34
+ "Consider what information the image contributes to the content and convey in the details.", value=False)
35
 
36
  if show_details:
37
  # Text input for additional details about the image, shown only if toggle is True
 
53
  # Optimized prompt for additional clarity and detail
54
  prompt_text = (
55
  "As an expert in image accessibility and alternative text, succinctly describe the image provided in less than 150 characters. "
56
+ "Provide a brief description that conveys the essential information conveyed by the image in three or fewer clear and concise sentences for use as alt text."
57
+ "Skip phrases like 'image of' or 'picture of.'"
58
  "Your description should form a clear, well-structured, and factual paragraph that avoids bullet points, focusing on creating a seamless narrative that serves as effective alternative text for accessibility purposes."
59
  )
60