Spaces:
Build error
Build error
Commit ·
d0443ee
1
Parent(s): b9dd2dd
Update weaviate_utils.py
Browse files45 unmodified lines464748495051525354555657585960616263646566676869704945 unmodified lines } try: client.schema.property.create(class_name, property_schema) except weaviate.exceptions.SchemaValidationException: # Property might already exist, so we can continue pass
# Ingest data for index, row in dataframe.iterrows(): obj = { "class": class_name, "id": str(index), "properties": row.to_dict() } client.data_object.create(obj)
# Log data ingestion log_debug_info(f"Data ingested into Weaviate for class: {class_name}")
def get_class_schema(client, class_name): all_classes = client.schema.get()["classes"] for cls in all_classes: if cls["class"] == class_name: return cls return None except weaviate.exceptions.SchemaValidationweaviate_utils.py+1-22