streamlit-octostar-utils 0.1.7a11__py3-none-any.whl → 0.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit_octostar_utils/nlp/ner.py +0 -2
- streamlit_octostar_utils/octostar/client.py +10 -13
- streamlit_octostar_utils/octostar/permissions.py +1 -1
- {streamlit_octostar_utils-0.1.7a11.dist-info → streamlit_octostar_utils-0.2.1.dist-info}/METADATA +2 -2
- {streamlit_octostar_utils-0.1.7a11.dist-info → streamlit_octostar_utils-0.2.1.dist-info}/RECORD +7 -8
- {streamlit_octostar_utils-0.1.7a11.dist-info → streamlit_octostar_utils-0.2.1.dist-info}/WHEEL +1 -1
- streamlit_octostar_utils/hello.py +0 -2
- {streamlit_octostar_utils-0.1.7a11.dist-info → streamlit_octostar_utils-0.2.1.dist-info}/LICENSE +0 -0
@@ -163,7 +163,6 @@ def compute_ner(
|
|
163
163
|
entities += flair_entities
|
164
164
|
del flair_entities
|
165
165
|
|
166
|
-
print("Checking REGEXES")
|
167
166
|
# REGEX model
|
168
167
|
for label, regexes in REGEX_NER_MODELS.items():
|
169
168
|
if not isinstance(regexes, list):
|
@@ -183,7 +182,6 @@ def compute_ner(
|
|
183
182
|
min_score = min([min_score] + [e.score for e in regex_entities])
|
184
183
|
|
185
184
|
# SPACY model
|
186
|
-
print("CHECKING SPACY")
|
187
185
|
chunks = []
|
188
186
|
chunk_start_offsets = []
|
189
187
|
current_chunk = []
|
@@ -1,12 +1,10 @@
|
|
1
1
|
from octostar.client import make_client, UserContext, User
|
2
2
|
from functools import wraps
|
3
|
-
from
|
3
|
+
from octostar_streamlit.desktop import whoami
|
4
4
|
from streamlit.runtime.scriptrunner import get_script_run_ctx
|
5
5
|
import hashlib
|
6
6
|
import streamlit as st
|
7
7
|
import time
|
8
|
-
import base64
|
9
|
-
import json
|
10
8
|
|
11
9
|
|
12
10
|
def impersonating_running_user(**client_kwargs):
|
@@ -27,14 +25,13 @@ def as_running_user(force_refresh=False):
|
|
27
25
|
script_ctx = get_script_run_ctx()
|
28
26
|
current_time = time.time()
|
29
27
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
)
|
28
|
+
should_refresh = (
|
29
|
+
force_refresh
|
30
|
+
or script_ctx.script_requests is not session.get("prev_run")
|
31
|
+
or current_time > session.get("token_expiry", 0) - 300 # 5 minutes buffer
|
32
|
+
)
|
36
33
|
|
37
|
-
if not should_refresh
|
34
|
+
if not should_refresh and "prev_user" in session:
|
38
35
|
return UserContext(session["prev_user"])
|
39
36
|
|
40
37
|
running_user = whoami()
|
@@ -45,12 +42,12 @@ def as_running_user(force_refresh=False):
|
|
45
42
|
else st.stop()
|
46
43
|
)
|
47
44
|
|
48
|
-
user_hash = int(hashlib.md5(running_user
|
45
|
+
user_hash = int(hashlib.md5(running_user.os_jwt.encode("utf-8")).hexdigest(), 16)
|
49
46
|
if "prev_user" not in session or hash(session["prev_user"]) != user_hash:
|
50
|
-
client = make_client(fixed_jwt=running_user
|
47
|
+
client = make_client(fixed_jwt=running_user.os_jwt)
|
51
48
|
user = User(client)
|
52
49
|
session["prev_user"] = user
|
53
50
|
session["token_expiry"] = user.jwt_expires_at
|
54
51
|
|
55
|
-
session["
|
52
|
+
session["prev_run"] = script_ctx.script_requests
|
56
53
|
return UserContext(session["prev_user"])
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import streamlit as st
|
2
2
|
|
3
|
-
from
|
3
|
+
from octostar_streamlit.desktop import get_open_workspace_ids
|
4
4
|
from octostar.utils.ontology import query_ontology
|
5
5
|
from octostar.utils.workspace.permissions import get_permissions, PermissionLevel
|
6
6
|
|
{streamlit_octostar_utils-0.1.7a11.dist-info → streamlit_octostar_utils-0.2.1.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: streamlit-octostar-utils
|
3
|
-
Version: 0.1
|
3
|
+
Version: 0.2.1
|
4
4
|
Summary:
|
5
5
|
License: MIT
|
6
6
|
Author: Octostar
|
@@ -21,6 +21,7 @@ Requires-Dist: flair (==0.13.1) ; extra == "nlp"
|
|
21
21
|
Requires-Dist: iso639 (>=0.1.0) ; extra == "nlp"
|
22
22
|
Requires-Dist: nltk (>=3.8.0,<4.0.0) ; extra == "nlp"
|
23
23
|
Requires-Dist: numpy (>=1.20.0)
|
24
|
+
Requires-Dist: octostar-streamlit (>=0.1.25,<0.2.0)
|
24
25
|
Requires-Dist: pottery (>=3.0.0,<4.0.0)
|
25
26
|
Requires-Dist: py3langid (>=0.2.0,<0.3.0) ; extra == "nlp"
|
26
27
|
Requires-Dist: pydantic (>=2.6.4,<3.0.0)
|
@@ -33,7 +34,6 @@ Requires-Dist: sortedcontainers (>=2.0.0)
|
|
33
34
|
Requires-Dist: spacy (>=3.7.0,<4.0.0) ; extra == "nlp"
|
34
35
|
Requires-Dist: spacy-download (==1.1.0) ; extra == "nlp"
|
35
36
|
Requires-Dist: streamlit (>=1.33.0,<2.0.0)
|
36
|
-
Requires-Dist: streamlit-octostar-research (>=0.1.22,<0.2.0)
|
37
37
|
Requires-Dist: sumy (>=0.11.0,<1.0.0) ; extra == "nlp"
|
38
38
|
Description-Content-Type: text/markdown
|
39
39
|
|
{streamlit_octostar_utils-0.1.7a11.dist-info → streamlit_octostar_utils-0.2.1.dist-info}/RECORD
RENAMED
@@ -19,14 +19,13 @@ streamlit_octostar_utils/core/filetypes.py,sha256=C4h4WDU8voMIdQETC3n1cd-CDgw9aN
|
|
19
19
|
streamlit_octostar_utils/core/threading/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
20
20
|
streamlit_octostar_utils/core/threading/key_queue.py,sha256=7CJpj0gvZMQd8eC5wKQi3Ak5SQQ4zQ1OPTs_OP_kD20,2255
|
21
21
|
streamlit_octostar_utils/core/timestamp.py,sha256=a3s4xfm1nctLzYsHOJxqoWIDTdbNY_yN1OByl8ahLc8,383
|
22
|
-
streamlit_octostar_utils/hello.py,sha256=JVeug8fnyYYf_qw6eeMDBrdqsSkiwnSHdPvb9puEGdA,69
|
23
22
|
streamlit_octostar_utils/nlp/__init__.py,sha256=BtlYDZK_xaEbc7Ju_7MznXbCVPZcdLn26xwR9qf_UhM,336
|
24
23
|
streamlit_octostar_utils/nlp/language.py,sha256=13f6kAALYjC3EclBzcyKPd4GlIeIR1mWPu3S6d-z814,549
|
25
|
-
streamlit_octostar_utils/nlp/ner.py,sha256=
|
24
|
+
streamlit_octostar_utils/nlp/ner.py,sha256=EAx4WNCH3jO9KQlK47hG3RMjnNpFadGl7CKfCQmSM7c,13326
|
26
25
|
streamlit_octostar_utils/octostar/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
27
|
-
streamlit_octostar_utils/octostar/client.py,sha256=
|
26
|
+
streamlit_octostar_utils/octostar/client.py,sha256=NUvHe9asd65g4-hJ4CuUvUns-9dNWes1XZRJlO9eAAc,1690
|
28
27
|
streamlit_octostar_utils/octostar/context.py,sha256=TpucK48EbeVy4vDqKd9UULEtr1JOY-_4nBs-rXZzESw,212
|
29
|
-
streamlit_octostar_utils/octostar/permissions.py,sha256=
|
28
|
+
streamlit_octostar_utils/octostar/permissions.py,sha256=G5nZQLR-k-5_Xeto4nDTb32828Ga-SHm1mvSB9tz-t4,1565
|
30
29
|
streamlit_octostar_utils/ontology/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
31
30
|
streamlit_octostar_utils/ontology/expand_entities.py,sha256=bBt32Dnts3VSzu13QQtPyfYe05IRodD9WfnhNTiBg_w,22749
|
32
31
|
streamlit_octostar_utils/ontology/inheritance.py,sha256=oSd6xDAlmI7iYOv3VJ7t8CRN2zK7_Cln26YHS20qAqw,138
|
@@ -37,7 +36,7 @@ streamlit_octostar_utils/threading/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzp
|
|
37
36
|
streamlit_octostar_utils/threading/async_task_manager.py,sha256=q7N6YZwUvIYMzkSHmsJNheNVCv93c03H6Hyg9uH8pvk,4747
|
38
37
|
streamlit_octostar_utils/threading/session_callback_manager.py,sha256=LvZVP4g6tvKtYmI13f2j1sX_7hm61Groqp5xJine9_k,3973
|
39
38
|
streamlit_octostar_utils/threading/session_state_hot_swapper.py,sha256=6eeCQI6A42hp4DmW2NQw2rbeR-k9N8DhfBKQdN_fbLU,811
|
40
|
-
streamlit_octostar_utils-0.1.
|
41
|
-
streamlit_octostar_utils-0.1.
|
42
|
-
streamlit_octostar_utils-0.1.
|
43
|
-
streamlit_octostar_utils-0.1.
|
39
|
+
streamlit_octostar_utils-0.2.1.dist-info/LICENSE,sha256=dkwVPyV03fPHHtERnF6RnvRXcll__tud9gWca1RcgnQ,1073
|
40
|
+
streamlit_octostar_utils-0.2.1.dist-info/METADATA,sha256=v16q0aIPofBZnQjs0jwkTtAeN2jHiTc2HJ_LjK_NQRo,2256
|
41
|
+
streamlit_octostar_utils-0.2.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
42
|
+
streamlit_octostar_utils-0.2.1.dist-info/RECORD,,
|
{streamlit_octostar_utils-0.1.7a11.dist-info → streamlit_octostar_utils-0.2.1.dist-info}/LICENSE
RENAMED
File without changes
|