zlmqi commited on
Commit
2eb80d3
1 Parent(s): 21b2214

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -9,7 +9,7 @@ import os
9
  # rebuild storage context and load knowledge index
10
  from llama_index import StorageContext, load_index_from_storage
11
  storage_context = StorageContext.from_defaults('./index/')
12
- index = load_index_from_storage(storage_context)
13
 
14
  class Chatbot:
15
  def __init__(self, api_key, index):
 
9
  # rebuild storage context and load knowledge index
10
  from llama_index import StorageContext, load_index_from_storage
11
  storage_context = StorageContext.from_defaults('./index/')
12
+ index = load_index_from_storage(storage_context, service_context=service_context)
13
 
14
  class Chatbot:
15
  def __init__(self, api_key, index):