Spaces:
Sleeping
Sleeping
Commit
·
a43c276
1
Parent(s):
386dae2
env updated
Browse files
__pycache__/llm_client.cpython-311.pyc
ADDED
|
Binary file (1.91 kB). View file
|
|
|
__pycache__/main.cpython-311.pyc
ADDED
|
Binary file (1.93 kB). View file
|
|
|
__pycache__/main_pipeline.cpython-311.pyc
ADDED
|
Binary file (1.83 kB). View file
|
|
|
__pycache__/pii_ner.cpython-311.pyc
ADDED
|
Binary file (1.75 kB). View file
|
|
|
__pycache__/pseudonymizer.cpython-311.pyc
ADDED
|
Binary file (2.63 kB). View file
|
|
|
llm_client.py
CHANGED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
import os
|
| 2 |
from typing import Optional
|
| 3 |
from openai import AsyncAzureOpenAI
|
|
|
|
| 4 |
|
|
|
|
| 5 |
|
| 6 |
class LLMClient:
|
| 7 |
def __init__(self):
|
|
|
|
| 1 |
import os
|
| 2 |
from typing import Optional
|
| 3 |
from openai import AsyncAzureOpenAI
|
| 4 |
+
from dotenv import load_dotenv
|
| 5 |
|
| 6 |
+
load_dotenv()
|
| 7 |
|
| 8 |
class LLMClient:
|
| 9 |
def __init__(self):
|
main_pipeline.py
CHANGED
|
@@ -32,6 +32,7 @@ async def run_pipeline(user_input: str) -> Dict[str, Any]:
|
|
| 32 |
output_entities = ner.extract_entities(llm_response)
|
| 33 |
pseudonymized_output, _ = pseudonymizer.pseudonymize(llm_response, output_entities)
|
| 34 |
session_data["pseudonymized_output"] = pseudonymized_output
|
|
|
|
| 35 |
else:
|
| 36 |
session_data["pseudonymized_output"] = None
|
| 37 |
|
|
|
|
| 32 |
output_entities = ner.extract_entities(llm_response)
|
| 33 |
pseudonymized_output, _ = pseudonymizer.pseudonymize(llm_response, output_entities)
|
| 34 |
session_data["pseudonymized_output"] = pseudonymized_output
|
| 35 |
+
print(pseudonymized_output)
|
| 36 |
else:
|
| 37 |
session_data["pseudonymized_output"] = None
|
| 38 |
|