Update app.py
Browse files
app.py
CHANGED
@@ -113,17 +113,17 @@ if INTdesc_input is not None and createSBScodes_clicked == True:
|
|
113 |
question = "Which, if any, of the below Saudi Billing System descriptions corresponds best to " + INTdesc_input +"? "
|
114 |
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"]]]
|
115 |
prompt = [question + " " + shortlist[0] + " " + shortlist[1] + " " + shortlist[2] + " " + shortlist[3] + " " + shortlist[4]]
|
116 |
-
st.write(prompt)
|
117 |
|
118 |
messages = [
|
119 |
-
{"role": "system", "content": "You are a
|
120 |
-
{"role": "user", "content":
|
121 |
]
|
122 |
outputs = pipe(
|
123 |
messages,
|
124 |
max_new_tokens=256,
|
125 |
)
|
126 |
-
st.write(outputs[0]["generated_text"][-1])
|
127 |
|
128 |
bs, b1, b2, b3, bLast = st.columns([0.75, 1.5, 1.5, 1.5, 0.75])
|
129 |
with b1:
|
|
|
113 |
question = "Which, if any, of the below Saudi Billing System descriptions corresponds best to " + INTdesc_input +"? "
|
114 |
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"]]]
|
115 |
prompt = [question + " " + shortlist[0] + " " + shortlist[1] + " " + shortlist[2] + " " + shortlist[3] + " " + shortlist[4]]
|
116 |
+
#st.write(prompt)
|
117 |
|
118 |
messages = [
|
119 |
+
{"role": "system", "content": "You are a knowledgable AI assistant who always answers truthfully and precisely!"},
|
120 |
+
{"role": "user", "content": prompt},
|
121 |
]
|
122 |
outputs = pipe(
|
123 |
messages,
|
124 |
max_new_tokens=256,
|
125 |
)
|
126 |
+
st.write(outputs[0]["generated_text"][-1]["content"])
|
127 |
|
128 |
bs, b1, b2, b3, bLast = st.columns([0.75, 1.5, 1.5, 1.5, 0.75])
|
129 |
with b1:
|