Update app.py
Browse files
app.py
CHANGED
@@ -170,13 +170,13 @@ def display_enhanced_analysis(damage_type, confidence):
|
|
170 |
|
171 |
custom_query = st.text_input(
|
172 |
"Ask specific questions about this damage type:",
|
173 |
-
placeholder="E.g., What are the long-term implications of this damage?"
|
|
|
174 |
)
|
175 |
-
|
176 |
if custom_query:
|
177 |
custom_results = RAG_SYSTEM.get_enhanced_analysis(
|
178 |
-
damage_type,
|
179 |
-
confidence,
|
180 |
custom_query=custom_query
|
181 |
)
|
182 |
st.markdown("### 💡 Custom Query Results")
|
@@ -185,7 +185,6 @@ def display_enhanced_analysis(damage_type, confidence):
|
|
185 |
st.markdown(f"**{category.replace('_', ' ').title()}:**")
|
186 |
for result in results:
|
187 |
st.markdown(result)
|
188 |
-
|
189 |
except Exception as e:
|
190 |
st.error(f"Error generating enhanced analysis: {str(e)}")
|
191 |
|
|
|
170 |
|
171 |
custom_query = st.text_input(
|
172 |
"Ask specific questions about this damage type:",
|
173 |
+
placeholder="E.g., What are the long-term implications of this damage?",
|
174 |
+
key=f"text_input_{damage_type}"
|
175 |
)
|
|
|
176 |
if custom_query:
|
177 |
custom_results = RAG_SYSTEM.get_enhanced_analysis(
|
178 |
+
damage_type,
|
179 |
+
confidence,
|
180 |
custom_query=custom_query
|
181 |
)
|
182 |
st.markdown("### 💡 Custom Query Results")
|
|
|
185 |
st.markdown(f"**{category.replace('_', ' ').title()}:**")
|
186 |
for result in results:
|
187 |
st.markdown(result)
|
|
|
188 |
except Exception as e:
|
189 |
st.error(f"Error generating enhanced analysis: {str(e)}")
|
190 |
|