ProfessorLeVesseur commited on
Commit
fb5451f
·
verified ·
1 Parent(s): 5555d7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -50,10 +50,9 @@ if uploaded_file is not None and analyze_button:
50
 
51
  # Optimized prompt for additional clarity and detail
52
  prompt_text = (
53
- "As an expert in image accessibility and alternative text, your task is to succinctly examine the image provided. "
54
- "Deliver a comprehensive yet concise explanation, capturing the essence of the image, its key elements, and their significance. "
55
- "Your description should form a clear, well-structured, and factual paragraph without exceeding 150 words. "
56
- "Avoid bullet points, focusing on creating a seamless narrative that serves as effective alternative text for accessibility purposes."
57
  )
58
 
59
  if show_details and additional_details:
@@ -88,7 +87,7 @@ if uploaded_file is not None and analyze_button:
88
  message_placeholder = st.empty()
89
  for completion in openai.chat.completions.create(
90
  model="gpt-4-vision-preview", messages=messages,
91
- max_tokens=150, stream=True
92
  ):
93
  # # Check if there is content to display
94
  # if completion.choices[0].delta.content is not None:
 
50
 
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 a single, clear, and concise sentence 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
 
58
  if show_details and additional_details:
 
87
  message_placeholder = st.empty()
88
  for completion in openai.chat.completions.create(
89
  model="gpt-4-vision-preview", messages=messages,
90
+ max_tokens=250, stream=True
91
  ):
92
  # # Check if there is content to display
93
  # if completion.choices[0].delta.content is not None: