Update pages/type_text.py
Browse files- pages/type_text.py +10 -4
pages/type_text.py
CHANGED
@@ -175,9 +175,6 @@ SBScorpus_embeddings = model.encode(SBScorpus)
|
|
175 |
# my_bar.progress(p.progress, text=f"Progress: {p.progress}%")
|
176 |
#my_bar.empty()
|
177 |
|
178 |
-
for _ in stqdm(range(50), desc="This is a slow task", mininterval=1):
|
179 |
-
time.sleep(0.5)
|
180 |
-
|
181 |
|
182 |
#progress_bar = st.progress(0)
|
183 |
#status_text = st.empty()
|
@@ -185,7 +182,8 @@ for _ in stqdm(range(50), desc="This is a slow task", mininterval=1):
|
|
185 |
# #time.sleep(0.5)
|
186 |
# progress_bar.progress(pct_complete)
|
187 |
# status_text.write("Progress: {}/100".format(pct_complete))
|
188 |
-
##status_text.write("Progress: {}".format("Done"))
|
|
|
189 |
|
190 |
if INTdesc_input is not None and st.button("Map to SBS codes", key="run_st_model"):
|
191 |
HF_model_results = util.semantic_search(INTdesc_embedding, SBScorpus_embeddings)
|
@@ -218,6 +216,14 @@ if INTdesc_input is not None and st.button("Map to SBS codes", key="run_st_model
|
|
218 |
{"role": "user", "content": prompt},
|
219 |
]
|
220 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
outputs = pipe(
|
222 |
messages,
|
223 |
max_new_tokens=256,
|
|
|
175 |
# my_bar.progress(p.progress, text=f"Progress: {p.progress}%")
|
176 |
#my_bar.empty()
|
177 |
|
|
|
|
|
|
|
178 |
|
179 |
#progress_bar = st.progress(0)
|
180 |
#status_text = st.empty()
|
|
|
182 |
# #time.sleep(0.5)
|
183 |
# progress_bar.progress(pct_complete)
|
184 |
# status_text.write("Progress: {}/100".format(pct_complete))
|
185 |
+
##status_text.write("Progress: {}".format("Done"))
|
186 |
+
#progress_bar.empty()
|
187 |
|
188 |
if INTdesc_input is not None and st.button("Map to SBS codes", key="run_st_model"):
|
189 |
HF_model_results = util.semantic_search(INTdesc_embedding, SBScorpus_embeddings)
|
|
|
216 |
{"role": "user", "content": prompt},
|
217 |
]
|
218 |
|
219 |
+
progress_bar = st.progress(0)
|
220 |
+
status_text = st.empty()
|
221 |
+
for pct_complete in range(1,101):
|
222 |
+
time.sleep(0.5)
|
223 |
+
progress_bar.progress(pct_complete)
|
224 |
+
#status_text.write("Progress: {}/100".format(pct_complete))
|
225 |
+
progress_bar.empty()
|
226 |
+
|
227 |
outputs = pipe(
|
228 |
messages,
|
229 |
max_new_tokens=256,
|