Tonic commited on
Commit
abb36c5
·
1 Parent(s): 599ec88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
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(Article)
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