Update app.py
Browse files
app.py
CHANGED
@@ -61,11 +61,16 @@ temperature = 0.7
|
|
61 |
max_tokens = 500
|
62 |
|
63 |
# Custom instruction text area in sidebar
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
)
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
# ----- GradCAM Implementation -----
|
71 |
|
|
|
61 |
max_tokens = 500
|
62 |
|
63 |
# Custom instruction text area in sidebar
|
64 |
+
use_custom_instructions = st.sidebar.toggle("Enable Custom Instructions", value=False, help="Toggle to enable/disable custom instructions")
|
65 |
+
|
66 |
+
if use_custom_instructions:
|
67 |
+
custom_instruction = st.sidebar.text_area(
|
68 |
+
"Custom Instructions (Advanced)",
|
69 |
+
value="Specify your preferred style of explanation (e.g., 'Provide technical, detailed explanations' or 'Use simple, non-technical language'). You can also specify what aspects of the image to focus on.",
|
70 |
+
help="Add specific instructions for the analysis"
|
71 |
+
)
|
72 |
+
else:
|
73 |
+
custom_instruction = ""
|
74 |
|
75 |
# ----- GradCAM Implementation -----
|
76 |
|