Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -123,9 +123,13 @@ Article = {
|
|
| 123 |
}
|
| 124 |
}
|
| 125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
# Initialize vectorstore
|
| 127 |
vectorstore = Weaviate(client, index_name="HereChat", text_key="text")
|
| 128 |
-
client.schema.create(
|
| 129 |
vectorstore._query_attrs = ["text", "title", "url", "views", "lang", "_additional {distance}"]
|
| 130 |
vectorstore.embedding = CohereEmbeddings(model="embed-multilingual-v2.0", cohere_api_key=cohere_api_key)
|
| 131 |
|
|
|
|
| 123 |
}
|
| 124 |
}
|
| 125 |
|
| 126 |
+
schema = {
|
| 127 |
+
"classes": [Article]
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
# Initialize vectorstore
|
| 131 |
vectorstore = Weaviate(client, index_name="HereChat", text_key="text")
|
| 132 |
+
client.schema.create(schema)
|
| 133 |
vectorstore._query_attrs = ["text", "title", "url", "views", "lang", "_additional {distance}"]
|
| 134 |
vectorstore.embedding = CohereEmbeddings(model="embed-multilingual-v2.0", cohere_api_key=cohere_api_key)
|
| 135 |
|