Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -132,6 +132,8 @@ def encrypt_doc_fn(doc):
|
|
| 132 |
|
| 133 |
import presidio_analyzer
|
| 134 |
import presidio_anonymizer
|
|
|
|
|
|
|
| 135 |
|
| 136 |
def anonymization_with_presidio(prompt):
|
| 137 |
analyzer = AnalyzerEngine()
|
|
@@ -647,7 +649,7 @@ with demo:
|
|
| 647 |
|
| 648 |
########################## FHE processing Part ##########################
|
| 649 |
|
| 650 |
-
gr.Markdown("<hr />")
|
| 651 |
gr.Markdown("## Step 3: De-identify the document and the prompt using FHE")
|
| 652 |
gr.Markdown(
|
| 653 |
"""Once the client encrypts the document and the prompt locally, it will be sent to a remote
|
|
@@ -696,7 +698,7 @@ with demo:
|
|
| 696 |
inputs=[original_sentences_box, query_box],
|
| 697 |
outputs=[anonymized_doc_output, anonymized_query_output, identified_words_output_df],
|
| 698 |
)
|
| 699 |
-
|
| 700 |
########################## Presidio ##########################
|
| 701 |
gr.Markdown("<hr />")
|
| 702 |
gr.Markdown("## Step 3: De-identify the document and the prompt")
|
|
|
|
| 132 |
|
| 133 |
import presidio_analyzer
|
| 134 |
import presidio_anonymizer
|
| 135 |
+
from presidio_analyzer import AnalyzerEngine
|
| 136 |
+
from presidio_anonymizer import AnonymizerEngine
|
| 137 |
|
| 138 |
def anonymization_with_presidio(prompt):
|
| 139 |
analyzer = AnalyzerEngine()
|
|
|
|
| 649 |
|
| 650 |
########################## FHE processing Part ##########################
|
| 651 |
|
| 652 |
+
""" gr.Markdown("<hr />")
|
| 653 |
gr.Markdown("## Step 3: De-identify the document and the prompt using FHE")
|
| 654 |
gr.Markdown(
|
| 655 |
"""Once the client encrypts the document and the prompt locally, it will be sent to a remote
|
|
|
|
| 698 |
inputs=[original_sentences_box, query_box],
|
| 699 |
outputs=[anonymized_doc_output, anonymized_query_output, identified_words_output_df],
|
| 700 |
)
|
| 701 |
+
"""
|
| 702 |
########################## Presidio ##########################
|
| 703 |
gr.Markdown("<hr />")
|
| 704 |
gr.Markdown("## Step 3: De-identify the document and the prompt")
|