saakshigupta commited on
Commit
af6361c
·
verified ·
1 Parent(s): 4692daa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -61,11 +61,16 @@ temperature = 0.7
61
  max_tokens = 500
62
 
63
  # Custom instruction text area in sidebar
64
- custom_instruction = st.sidebar.text_area(
65
- "Custom Instructions (Advanced)",
66
- value="Focus on analyzing the highlighted regions from the GradCAM visualization. Examine facial inconsistencies, lighting irregularities, and other artifacts visible in the heat map.",
67
- help="Add specific instructions for the LLM analysis"
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