Update pages/type_text.py
Browse files- pages/type_text.py +9 -5
pages/type_text.py
CHANGED
@@ -87,7 +87,8 @@ def convert_json(df:pd.DataFrame):
|
|
87 |
#st.json(json_string, expanded=True)
|
88 |
return json_string
|
89 |
|
90 |
-
INTdesc_input = st.text_input("Type internal description", key="user_input")
|
|
|
91 |
|
92 |
placeholder, right_column = st.columns(2)
|
93 |
#placeholder_clicked = placeholder.button("Perform some action", key="user_placeholder")
|
@@ -127,8 +128,8 @@ rs_models = {
|
|
127 |
}
|
128 |
|
129 |
## Create the select Reasoning box
|
130 |
-
selected_rs_model = st.selectbox('
|
131 |
-
st.write("Current selection:", selected_rs_model)
|
132 |
|
133 |
## Get the selected Reasoning model
|
134 |
Reasoning_model = rs_models[selected_rs_model]
|
@@ -177,8 +178,11 @@ if INTdesc_input is not None and st.button("Map to SBS codes"):
|
|
177 |
question = "Which one, if any, of the following Saudi Billing System descriptions A, B, C, D, or E corresponds best to " + INTdesc_input +"? "
|
178 |
shortlist = [SBScorpus[result[0]["corpus_id"]], SBScorpus[result[1]["corpus_id"]], SBScorpus[result[2]["corpus_id"]], SBScorpus[result[3]["corpus_id"]], SBScorpus[result[4]["corpus_id"]]]
|
179 |
prompt = question + " " +"A: "+ shortlist[0] + " " +"B: " + shortlist[1] + " " + "C: " + shortlist[2] + " " + "D: " + shortlist[3] + " " + "E: " + shortlist[4]
|
180 |
-
st.write(prompt)
|
181 |
-
|
|
|
|
|
|
|
182 |
messages = [
|
183 |
{"role": "system", "content": "You are a knowledgable AI assistant who always answers truthfully and precisely!"},
|
184 |
{"role": "user", "content": prompt},
|
|
|
87 |
#st.json(json_string, expanded=True)
|
88 |
return json_string
|
89 |
|
90 |
+
#INTdesc_input = st.text_input("Type internal description", key="user_input")
|
91 |
+
INTdesc_input = st.text_input(r"$\textsf{\Large Type internal description}$", key="user_input")
|
92 |
|
93 |
placeholder, right_column = st.columns(2)
|
94 |
#placeholder_clicked = placeholder.button("Perform some action", key="user_placeholder")
|
|
|
128 |
}
|
129 |
|
130 |
## Create the select Reasoning box
|
131 |
+
selected_rs_model = st.selectbox('Current selected Reasoning model:', list(rs_models.keys()))
|
132 |
+
#st.write("Current selection:", selected_rs_model)
|
133 |
|
134 |
## Get the selected Reasoning model
|
135 |
Reasoning_model = rs_models[selected_rs_model]
|
|
|
178 |
question = "Which one, if any, of the following Saudi Billing System descriptions A, B, C, D, or E corresponds best to " + INTdesc_input +"? "
|
179 |
shortlist = [SBScorpus[result[0]["corpus_id"]], SBScorpus[result[1]["corpus_id"]], SBScorpus[result[2]["corpus_id"]], SBScorpus[result[3]["corpus_id"]], SBScorpus[result[4]["corpus_id"]]]
|
180 |
prompt = question + " " +"A: "+ shortlist[0] + " " +"B: " + shortlist[1] + " " + "C: " + shortlist[2] + " " + "D: " + shortlist[3] + " " + "E: " + shortlist[4]
|
181 |
+
#st.write(prompt)
|
182 |
+
|
183 |
+
|
184 |
+
|
185 |
+
|
186 |
messages = [
|
187 |
{"role": "system", "content": "You are a knowledgable AI assistant who always answers truthfully and precisely!"},
|
188 |
{"role": "user", "content": prompt},
|