Spaces:
Sleeping
Sleeping
Update extract_and_store_supabase.py
Browse files
extract_and_store_supabase.py
CHANGED
|
@@ -5,14 +5,14 @@ import requests
|
|
| 5 |
from supabase_models import Supabase_Client
|
| 6 |
|
| 7 |
|
| 8 |
-
def extract_structure_store_message(user_id:str,message_id:str , attachment_id:str):
|
| 9 |
|
| 10 |
if attachment_id and message_id:
|
| 11 |
project_id = os.getenv('PROJECT_ID')
|
| 12 |
processor_id = os.getenv('PROCESSOR_ID')
|
| 13 |
document_entities = {}
|
| 14 |
-
|
| 15 |
-
file_name = f"{message_id}_{attachment_id}.{
|
| 16 |
print(f"file_name: {file_name}")
|
| 17 |
supabase = Supabase_Client().instance
|
| 18 |
try:
|
|
|
|
| 5 |
from supabase_models import Supabase_Client
|
| 6 |
|
| 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')
|
| 12 |
processor_id = os.getenv('PROCESSOR_ID')
|
| 13 |
document_entities = {}
|
| 14 |
+
|
| 15 |
+
file_name = f"{message_id}_{attachment_id}.{attachment_extension}"
|
| 16 |
print(f"file_name: {file_name}")
|
| 17 |
supabase = Supabase_Client().instance
|
| 18 |
try:
|