Spaces:
Sleeping
Sleeping
Update extract_and_store_supabase.py
Browse files
extract_and_store_supabase.py
CHANGED
@@ -19,14 +19,14 @@ def generate_custom_random_string():
|
|
19 |
# Add "RAN" in front of the string
|
20 |
return "RAN" + random_string
|
21 |
|
22 |
-
async def extract_structure_store_message(filename:str,user_id:str
|
23 |
message_id = generate_custom_random_string()
|
24 |
attachment_id = 'UPLOADED_MANUALLY'
|
25 |
if attachment_id and message_id:
|
26 |
project_id = os.getenv('PROJECT_ID')
|
27 |
processor_id = os.getenv('PROCESSOR_ID')
|
28 |
document_entities = {}
|
29 |
-
|
30 |
# file_name = f"{message_id}_{attachment_id}"
|
31 |
# print(f"file_name: {file_name}")
|
32 |
supabase = Supabase_Client().instance
|
|
|
19 |
# Add "RAN" in front of the string
|
20 |
return "RAN" + random_string
|
21 |
|
22 |
+
async def extract_structure_store_message(filename:str,user_id:str):
|
23 |
message_id = generate_custom_random_string()
|
24 |
attachment_id = 'UPLOADED_MANUALLY'
|
25 |
if attachment_id and message_id:
|
26 |
project_id = os.getenv('PROJECT_ID')
|
27 |
processor_id = os.getenv('PROCESSOR_ID')
|
28 |
document_entities = {}
|
29 |
+
attachment_extension = filename.split[1]
|
30 |
# file_name = f"{message_id}_{attachment_id}"
|
31 |
# print(f"file_name: {file_name}")
|
32 |
supabase = Supabase_Client().instance
|