Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import logging
|
|
2 |
import os
|
3 |
import base64
|
4 |
import datetime
|
|
|
5 |
import dotenv
|
6 |
import pandas as pd
|
7 |
import streamlit as st
|
@@ -17,11 +18,15 @@ st.set_page_config(page_title="Presidio PHI De-identification", layout="wide", i
|
|
17 |
dotenv.load_dotenv()
|
18 |
logger = logging.getLogger("presidio-streamlit")
|
19 |
|
20 |
-
def
|
21 |
"""🕒 Stamps time with Central swagger!"""
|
22 |
central = pytz.timezone("US/Central")
|
23 |
return datetime.now(central).strftime("%I%M%p_%d-%m-%y").upper()
|
24 |
-
|
|
|
|
|
|
|
|
|
25 |
def nlp_engine_and_registry(model_family: str, model_path: str) -> tuple:
|
26 |
"""🤖 Sparks NLP models with a wink!"""
|
27 |
registry = RecognizerRegistry()
|
|
|
2 |
import os
|
3 |
import base64
|
4 |
import datetime
|
5 |
+
from datetime import datetime
|
6 |
import dotenv
|
7 |
import pandas as pd
|
8 |
import streamlit as st
|
|
|
18 |
dotenv.load_dotenv()
|
19 |
logger = logging.getLogger("presidio-streamlit")
|
20 |
|
21 |
+
def get_timestamp_prefix_old() -> str:
|
22 |
"""🕒 Stamps time with Central swagger!"""
|
23 |
central = pytz.timezone("US/Central")
|
24 |
return datetime.now(central).strftime("%I%M%p_%d-%m-%y").upper()
|
25 |
+
|
26 |
+
def get_timestamp_prefix() -> str:
|
27 |
+
central = pytz.timezone("US/Central")
|
28 |
+
return datetime.datetime.now(central).strftime("%I%M%p_%d-%m-%y").upper()
|
29 |
+
|
30 |
def nlp_engine_and_registry(model_family: str, model_path: str) -> tuple:
|
31 |
"""🤖 Sparks NLP models with a wink!"""
|
32 |
registry = RecognizerRegistry()
|