DeepVen commited on
Commit
af5aac8
·
1 Parent(s): af8b700

Update LLMInsights.py

Browse files
Files changed (1) hide show
  1. LLMInsights.py +11 -8
LLMInsights.py CHANGED
@@ -173,15 +173,18 @@ def rag_response(response):
173
 
174
  #st.markdown(".stTextInput > label {font-size:105%; font-weight:bold; color:blue;} ",unsafe_allow_html=True) #for all text-input label sections
175
 
176
- question_title = '<h1 style="color:#33ff33;font-size:24px;">Question</h1>'
177
-
178
-
179
-
180
  st.markdown('<h1 style="color:#100170;font-size:48px;text-align:center;">RAG Response</h1>', unsafe_allow_html=True)
181
- st.markdown('<h1 style="color:#100170;font-size:24px;">Question</h1>', unsafe_allow_html=True)
182
- st.text_area(label="", value=response["query"], height=30)
183
- st.markdown('<h1 style="color:#100170;font-size:24px;">RAG Output</h1>', unsafe_allow_html=True)
184
- st.text_area(label="", value=response["result"])
 
 
 
 
 
 
185
  # st.markdown('<h1 style="color:#100170;font-size:24px;">Augmented knowledge</h1>', unsafe_allow_html=True)
186
  # st.text_area(label="", value=response["source_documents"])
187
 
 
173
 
174
  #st.markdown(".stTextInput > label {font-size:105%; font-weight:bold; color:blue;} ",unsafe_allow_html=True) #for all text-input label sections
175
 
176
+
 
 
 
177
  st.markdown('<h1 style="color:#100170;font-size:48px;text-align:center;">RAG Response</h1>', unsafe_allow_html=True)
178
+
179
+ question_title = '<h2 style="color:#33ff33;font-size:24px;">Question</h2>'
180
+ question = f"<div style='background-color:#f0f0f0; padding:10px; border-radius:10px;'>{response['query']}</div>"
181
+ st.markdown(question_title, unsafe_allow_html=True)
182
+ st.markdown(question, unsafe_allow_html=True)
183
+
184
+ rag_output_title = '<h2 style="color:#100170;font-size:24px;">RAG Output</h2>'
185
+ rag_output = f"<div style='background-color:#f0f0f0; padding:10px; border-radius:10px;'>{response['result']}</div>"
186
+ st.markdown(rag_output_title, unsafe_allow_html=True)
187
+ st.markdown(rag_output, unsafe_allow_html=True)
188
  # st.markdown('<h1 style="color:#100170;font-size:24px;">Augmented knowledge</h1>', unsafe_allow_html=True)
189
  # st.text_area(label="", value=response["source_documents"])
190