Spaces:
Sleeping
Sleeping
Update extract_and_store_supabase.py
Browse files
extract_and_store_supabase.py
CHANGED
@@ -5,7 +5,7 @@ import requests
|
|
5 |
from supabase_models import Supabase_Client
|
6 |
from authenticate import get_access_token_v1
|
7 |
|
8 |
-
def extract_structure_store_message(user_id:str,message_id:str , attachment_id:str,attachment_extension:str):
|
9 |
|
10 |
if attachment_id and message_id:
|
11 |
project_id = os.getenv('PROJECT_ID')
|
@@ -74,7 +74,7 @@ def extract_structure_store_message(user_id:str,message_id:str , attachment_id:s
|
|
74 |
mention_text = ent.get('mentionText')
|
75 |
normalised_values = ent.get('normalizedValue') if 'normalizedValue' in ent else None
|
76 |
document_entities[ent.get('type')] = {"mention_text":mention_text,"normalizedValue":normalised_values}
|
77 |
-
|
78 |
print(document_entities)
|
79 |
insert_data_response = response = (
|
80 |
supabase.table("document_ai_entities")
|
|
|
5 |
from supabase_models import Supabase_Client
|
6 |
from authenticate import get_access_token_v1
|
7 |
|
8 |
+
def extract_structure_store_message(user_id:str,message_id:str , attachment_id:str,attachment_extension:str,email:str):
|
9 |
|
10 |
if attachment_id and message_id:
|
11 |
project_id = os.getenv('PROJECT_ID')
|
|
|
74 |
mention_text = ent.get('mentionText')
|
75 |
normalised_values = ent.get('normalizedValue') if 'normalizedValue' in ent else None
|
76 |
document_entities[ent.get('type')] = {"mention_text":mention_text,"normalizedValue":normalised_values}
|
77 |
+
document_entities['email'] = email
|
78 |
print(document_entities)
|
79 |
insert_data_response = response = (
|
80 |
supabase.table("document_ai_entities")
|