Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -33,9 +33,14 @@ if show_details:
|
|
33 |
# Button to trigger the analysis
|
34 |
analyze_button = st.button("Analyse the MTSS Image")
|
35 |
|
36 |
-
if
|
37 |
-
|
|
|
|
|
|
|
38 |
base64_image = encode_image(uploaded_file)
|
|
|
|
|
39 |
prompt_text = (
|
40 |
"You are a highly knowledgeable accessibility expert. "
|
41 |
"Your task is to examine the following image in detail. "
|
|
|
33 |
# Button to trigger the analysis
|
34 |
analyze_button = st.button("Analyse the MTSS Image")
|
35 |
|
36 |
+
# Check if an image has been uploaded, if the API key is available, and if the button has been pressed
|
37 |
+
if uploaded_file is not None and api_key and analyze_button:
|
38 |
+
|
39 |
+
with st.spinner("Analysing the image ..."):
|
40 |
+
# Encode the image
|
41 |
base64_image = encode_image(uploaded_file)
|
42 |
+
|
43 |
+
# Optimized prompt for additional clarity and detail
|
44 |
prompt_text = (
|
45 |
"You are a highly knowledgeable accessibility expert. "
|
46 |
"Your task is to examine the following image in detail. "
|