Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -967,7 +967,7 @@ with st.sidebar:
|
|
| 967 |
# Enhanced Settings
|
| 968 |
st.subheader("π Token Settings")
|
| 969 |
unlimited_tokens = st.checkbox("π₯ Unlimited Tokens Mode", value=True, help="Use higher token limits for detailed responses")
|
| 970 |
-
use_ai_enhancement = st.checkbox("
|
| 971 |
|
| 972 |
st.subheader("ποΈ Display Settings")
|
| 973 |
show_sources = st.checkbox("π Show Sources", value=True)
|
|
@@ -1065,7 +1065,7 @@ if hasattr(st.session_state, 'process_personality_question'):
|
|
| 1065 |
# Display AI answer or extracted answer
|
| 1066 |
if use_ai_enhancement and result['has_both']:
|
| 1067 |
answer_text = result['ai_answer']
|
| 1068 |
-
st.markdown(f"
|
| 1069 |
|
| 1070 |
# Also show extracted answer for comparison if different
|
| 1071 |
if result['extracted_answer'] != answer_text:
|
|
@@ -1179,7 +1179,7 @@ if prompt := st.chat_input("Ask questions about your documents..."):
|
|
| 1179 |
# Display AI answer or extracted answer
|
| 1180 |
if use_ai_enhancement and result['has_both']:
|
| 1181 |
answer_text = result['ai_answer']
|
| 1182 |
-
st.markdown(f"
|
| 1183 |
|
| 1184 |
# Also show extracted answer for comparison if different
|
| 1185 |
if result['extracted_answer'] != answer_text:
|
|
|
|
| 967 |
# Enhanced Settings
|
| 968 |
st.subheader("π Token Settings")
|
| 969 |
unlimited_tokens = st.checkbox("π₯ Unlimited Tokens Mode", value=True, help="Use higher token limits for detailed responses")
|
| 970 |
+
use_ai_enhancement = st.checkbox("πΎ AI Enhancement", value=bool(openrouter_key), help="Enhance answers with AI when documents are found")
|
| 971 |
|
| 972 |
st.subheader("ποΈ Display Settings")
|
| 973 |
show_sources = st.checkbox("π Show Sources", value=True)
|
|
|
|
| 1065 |
# Display AI answer or extracted answer
|
| 1066 |
if use_ai_enhancement and result['has_both']:
|
| 1067 |
answer_text = result['ai_answer']
|
| 1068 |
+
st.markdown(f"πΎ **AI Enhanced Answer:** {answer_text}")
|
| 1069 |
|
| 1070 |
# Also show extracted answer for comparison if different
|
| 1071 |
if result['extracted_answer'] != answer_text:
|
|
|
|
| 1179 |
# Display AI answer or extracted answer
|
| 1180 |
if use_ai_enhancement and result['has_both']:
|
| 1181 |
answer_text = result['ai_answer']
|
| 1182 |
+
st.markdown(f"πΎ **AI Enhanced Answer:** {answer_text}")
|
| 1183 |
|
| 1184 |
# Also show extracted answer for comparison if different
|
| 1185 |
if result['extracted_answer'] != answer_text:
|