Spaces:
Running
Running
petrsovadina
commited on
Commit
•
8acb3f5
1
Parent(s):
3d379fe
Update presidio_streamlit.py
Browse files- presidio_streamlit.py +25 -1
presidio_streamlit.py
CHANGED
@@ -339,4 +339,28 @@ try:
|
|
339 |
axis=1,
|
340 |
)
|
341 |
df_subset["Text"] = [st_text[res.start : res.end] for res in st_analyze_results]
|
342 |
-
if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
339 |
axis=1,
|
340 |
)
|
341 |
df_subset["Text"] = [st_text[res.start : res.end] for res in st_analyze_results]
|
342 |
+
if st_return_decision_process:
|
343 |
+
analysis_explanation_df = pd.DataFrame.from_records(
|
344 |
+
[r.analysis_explanation.to_dict() for r in st_analyze_results]
|
345 |
+
)
|
346 |
+
df_subset = pd.concat([df_subset, analysis_explanation_df], axis=1)
|
347 |
+
st.dataframe(df_subset.reset_index(drop=True), use_container_width=True)
|
348 |
+
else:
|
349 |
+
st.text("Žádné nálezy")
|
350 |
+
|
351 |
+
except Exception as e:
|
352 |
+
print(e)
|
353 |
+
traceback.print_exc()
|
354 |
+
st.error(e)
|
355 |
+
|
356 |
+
components.html(
|
357 |
+
"""
|
358 |
+
<script type="text/javascript">
|
359 |
+
(function(c,l,a,r,i,t,y){
|
360 |
+
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
361 |
+
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
|
362 |
+
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
|
363 |
+
})(window, document, "clarity", "script", "h7f8bp42n8");
|
364 |
+
</script>
|
365 |
+
"""
|
366 |
+
)
|