Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
removed column deprecation param
Browse files
pages/AI_Shopping_Assistant.py
CHANGED
@@ -111,7 +111,7 @@ st.markdown("""
|
|
111 |
def write_logo():
|
112 |
col1, col2, col3 = st.columns([5, 1, 5])
|
113 |
with col2:
|
114 |
-
st.image(AI_ICON,
|
115 |
|
116 |
def write_top_bar():
|
117 |
col1, col2 = st.columns([77,23])
|
@@ -170,7 +170,7 @@ def write_user_message(md):
|
|
170 |
col1, col2 = st.columns([3,97])
|
171 |
|
172 |
with col1:
|
173 |
-
st.image(USER_ICON,
|
174 |
with col2:
|
175 |
st.markdown("<div style='color:#e28743';font-size:18px;padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;font-style: italic;'>"+md['question']+"</div>", unsafe_allow_html = True)
|
176 |
|
@@ -181,7 +181,7 @@ def render_answer(question,answer,index):
|
|
181 |
|
182 |
col1, col2, col_3 = st.columns([4,74,22])
|
183 |
with col1:
|
184 |
-
st.image(AI_ICON,
|
185 |
with col2:
|
186 |
use_interim_results = False
|
187 |
src_dict = {}
|
@@ -202,10 +202,10 @@ def render_answer(question,answer,index):
|
|
202 |
resizedImg = img.resize((230, 180), Image.Resampling.LANCZOS)
|
203 |
if(index ==0):
|
204 |
with img_col1:
|
205 |
-
st.image(resizedImg,
|
206 |
if(index ==1):
|
207 |
with img_col2:
|
208 |
-
st.image(resizedImg,
|
209 |
|
210 |
if(answer['last_tool']['name'] == "generate_images" or answer['last_tool']['name'] == "get_any_general_recommendation"):
|
211 |
st.write("<br>",unsafe_allow_html = True)
|
@@ -220,7 +220,7 @@ def render_answer(question,answer,index):
|
|
220 |
img_ = Image.open(BytesIO(s3_stream))
|
221 |
resizedImg = img_.resize((230, 180), Image.Resampling.LANCZOS)
|
222 |
with gen_img_col1:
|
223 |
-
st.image(resizedImg,caption = "Generated image for "+key.split(".")[0],
|
224 |
st.write("<br>",unsafe_allow_html = True)
|
225 |
colu1,colu2,colu3 = st.columns([4,82,20])
|
226 |
if(answer['source']!={}):
|
|
|
111 |
def write_logo():
|
112 |
col1, col2, col3 = st.columns([5, 1, 5])
|
113 |
with col2:
|
114 |
+
st.image(AI_ICON, use_container_width='always')
|
115 |
|
116 |
def write_top_bar():
|
117 |
col1, col2 = st.columns([77,23])
|
|
|
170 |
col1, col2 = st.columns([3,97])
|
171 |
|
172 |
with col1:
|
173 |
+
st.image(USER_ICON, use_container_width='always')
|
174 |
with col2:
|
175 |
st.markdown("<div style='color:#e28743';font-size:18px;padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;font-style: italic;'>"+md['question']+"</div>", unsafe_allow_html = True)
|
176 |
|
|
|
181 |
|
182 |
col1, col2, col_3 = st.columns([4,74,22])
|
183 |
with col1:
|
184 |
+
st.image(AI_ICON, use_container_width='always')
|
185 |
with col2:
|
186 |
use_interim_results = False
|
187 |
src_dict = {}
|
|
|
202 |
resizedImg = img.resize((230, 180), Image.Resampling.LANCZOS)
|
203 |
if(index ==0):
|
204 |
with img_col1:
|
205 |
+
st.image(resizedImg,use_container_width = True,caption = item['title'])
|
206 |
if(index ==1):
|
207 |
with img_col2:
|
208 |
+
st.image(resizedImg,use_container_width = True,caption = item['title'])
|
209 |
|
210 |
if(answer['last_tool']['name'] == "generate_images" or answer['last_tool']['name'] == "get_any_general_recommendation"):
|
211 |
st.write("<br>",unsafe_allow_html = True)
|
|
|
220 |
img_ = Image.open(BytesIO(s3_stream))
|
221 |
resizedImg = img_.resize((230, 180), Image.Resampling.LANCZOS)
|
222 |
with gen_img_col1:
|
223 |
+
st.image(resizedImg,caption = "Generated image for "+key.split(".")[0],use_container_width = True)
|
224 |
st.write("<br>",unsafe_allow_html = True)
|
225 |
colu1,colu2,colu3 = st.columns([4,82,20])
|
226 |
if(answer['source']!={}):
|
pages/Multimodal_Conversational_Search.py
CHANGED
@@ -121,7 +121,7 @@ awsauth = HTTPBasicAuth('master',st.secrets['ml_search_demo_api_access'])
|
|
121 |
def write_logo():
|
122 |
col1, col2, col3 = st.columns([5, 1, 5])
|
123 |
with col2:
|
124 |
-
st.image(AI_ICON,
|
125 |
|
126 |
def write_top_bar():
|
127 |
col1, col2 = st.columns([77,23])
|
@@ -129,7 +129,7 @@ def write_top_bar():
|
|
129 |
st.write("")
|
130 |
st.header("Chat with your data",divider='rainbow')
|
131 |
|
132 |
-
#st.image(AI_ICON,
|
133 |
|
134 |
with col2:
|
135 |
st.write("")
|
@@ -185,7 +185,7 @@ def write_user_message(md):
|
|
185 |
col1, col2 = st.columns([3,97])
|
186 |
|
187 |
with col1:
|
188 |
-
st.image(USER_ICON,
|
189 |
with col2:
|
190 |
st.markdown("<div style='color:#e28743';font-size:18px;padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;font-style: italic;'>"+md['question']+"</div>", unsafe_allow_html = True)
|
191 |
|
@@ -196,7 +196,7 @@ def render_answer(question,answer,index,res_img):
|
|
196 |
|
197 |
col1, col2, col_3 = st.columns([4,74,22])
|
198 |
with col1:
|
199 |
-
st.image(AI_ICON,
|
200 |
with col2:
|
201 |
ans_ = answer['answer']
|
202 |
st.write(ans_)
|
|
|
121 |
def write_logo():
|
122 |
col1, col2, col3 = st.columns([5, 1, 5])
|
123 |
with col2:
|
124 |
+
st.image(AI_ICON, use_container_width='always')
|
125 |
|
126 |
def write_top_bar():
|
127 |
col1, col2 = st.columns([77,23])
|
|
|
129 |
st.write("")
|
130 |
st.header("Chat with your data",divider='rainbow')
|
131 |
|
132 |
+
#st.image(AI_ICON, use_container_width='always')
|
133 |
|
134 |
with col2:
|
135 |
st.write("")
|
|
|
185 |
col1, col2 = st.columns([3,97])
|
186 |
|
187 |
with col1:
|
188 |
+
st.image(USER_ICON, use_container_width='always')
|
189 |
with col2:
|
190 |
st.markdown("<div style='color:#e28743';font-size:18px;padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;font-style: italic;'>"+md['question']+"</div>", unsafe_allow_html = True)
|
191 |
|
|
|
196 |
|
197 |
col1, col2, col_3 = st.columns([4,74,22])
|
198 |
with col1:
|
199 |
+
st.image(AI_ICON, use_container_width='always')
|
200 |
with col2:
|
201 |
ans_ = answer['answer']
|
202 |
st.write(ans_)
|
pages/Semantic_Search.py
CHANGED
@@ -538,7 +538,7 @@ def handle_input():
|
|
538 |
def write_top_bar():
|
539 |
col1, col2,col3,col4 = st.columns([2.5,35,8,7])
|
540 |
with col1:
|
541 |
-
st.image(TEXT_ICON,
|
542 |
with col2:
|
543 |
#st.markdown("")
|
544 |
input = st.text_input( "Ask here",label_visibility = "collapsed",key="input_text",placeholder = "Type your query")
|
@@ -551,7 +551,7 @@ def write_top_bar():
|
|
551 |
col5, col6 = st.columns([4.5,95])
|
552 |
|
553 |
with col5:
|
554 |
-
st.image(IMAGE_ICON,
|
555 |
with col6:
|
556 |
with st.expander(':green[Search by using an image]'):
|
557 |
tab2, tab1 = st.tabs(["Upload Image","Generate Image by AI"])
|
@@ -730,7 +730,7 @@ def write_user_message(md,ans):
|
|
730 |
col1, col2, col3 = st.columns([3,40,20])
|
731 |
|
732 |
with col1:
|
733 |
-
st.image(USER_ICON,
|
734 |
with col2:
|
735 |
st.markdown("<div style='fontSize:15px;padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;'>Input Text: </div><div style='fontSize:25px;padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;font-style: italic;color:#e28743'>"+md['question']+"</div>", unsafe_allow_html = True)
|
736 |
if('query_sparse' in ans):
|
@@ -778,7 +778,7 @@ def stem_(sentence):
|
|
778 |
def render_answer(answer,index):
|
779 |
column1, column2 = st.columns([6,90])
|
780 |
with column1:
|
781 |
-
st.image(AI_ICON,
|
782 |
with column2:
|
783 |
st.markdown("<div style='fontSize:25px;padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;'>Results </div>", unsafe_allow_html = True)
|
784 |
if(st.session_state.input_evaluate == "enabled" and st.session_state.input_ndcg > 0):
|
@@ -946,7 +946,7 @@ def render_answer(answer,index):
|
|
946 |
|
947 |
placeholder__ = st.empty()
|
948 |
|
949 |
-
placeholder__.button("🔄",key=rdn_key,on_click=on_button_click, help = "This will regenerate the responses with new settings that you entered, Note: To see difference in responses, you should change any of the applicable settings")#,type="primary",
|
950 |
|
951 |
if(filter_out > 0):
|
952 |
placeholder_no_results.text(str(filter_out)+" result(s) removed due to missing or in-appropriate content")
|
|
|
538 |
def write_top_bar():
|
539 |
col1, col2,col3,col4 = st.columns([2.5,35,8,7])
|
540 |
with col1:
|
541 |
+
st.image(TEXT_ICON, use_container_width='always')
|
542 |
with col2:
|
543 |
#st.markdown("")
|
544 |
input = st.text_input( "Ask here",label_visibility = "collapsed",key="input_text",placeholder = "Type your query")
|
|
|
551 |
col5, col6 = st.columns([4.5,95])
|
552 |
|
553 |
with col5:
|
554 |
+
st.image(IMAGE_ICON, use_container_width='always')
|
555 |
with col6:
|
556 |
with st.expander(':green[Search by using an image]'):
|
557 |
tab2, tab1 = st.tabs(["Upload Image","Generate Image by AI"])
|
|
|
730 |
col1, col2, col3 = st.columns([3,40,20])
|
731 |
|
732 |
with col1:
|
733 |
+
st.image(USER_ICON, use_container_width='always')
|
734 |
with col2:
|
735 |
st.markdown("<div style='fontSize:15px;padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;'>Input Text: </div><div style='fontSize:25px;padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;font-style: italic;color:#e28743'>"+md['question']+"</div>", unsafe_allow_html = True)
|
736 |
if('query_sparse' in ans):
|
|
|
778 |
def render_answer(answer,index):
|
779 |
column1, column2 = st.columns([6,90])
|
780 |
with column1:
|
781 |
+
st.image(AI_ICON, use_container_width='always')
|
782 |
with column2:
|
783 |
st.markdown("<div style='fontSize:25px;padding:3px 7px 3px 7px;borderWidth: 0px;borderColor: red;borderStyle: solid;width: fit-content;height: fit-content;border-radius: 10px;'>Results </div>", unsafe_allow_html = True)
|
784 |
if(st.session_state.input_evaluate == "enabled" and st.session_state.input_ndcg > 0):
|
|
|
946 |
|
947 |
placeholder__ = st.empty()
|
948 |
|
949 |
+
placeholder__.button("🔄",key=rdn_key,on_click=on_button_click, help = "This will regenerate the responses with new settings that you entered, Note: To see difference in responses, you should change any of the applicable settings")#,type="primary",use_container_width=True)
|
950 |
|
951 |
if(filter_out > 0):
|
952 |
placeholder_no_results.text(str(filter_out)+" result(s) removed due to missing or in-appropriate content")
|