Spaces:
Sleeping
Sleeping
added introductory prompt
Browse files- backend.py +3 -0
backend.py
CHANGED
@@ -102,8 +102,11 @@ def handle_query(query_str: str,
|
|
102 |
|
103 |
index = build_index("data/chiarimento.txt")
|
104 |
gr.Info("index costruito con richiesta di chiarimento")
|
|
|
105 |
|
106 |
else:
|
|
|
|
|
107 |
# The index is already built, no need to rebuild it.
|
108 |
storage_context = StorageContext.from_defaults(persist_dir=PERSIST_DIR)
|
109 |
index = load_index_from_storage(storage_context)
|
|
|
102 |
|
103 |
index = build_index("data/chiarimento.txt")
|
104 |
gr.Info("index costruito con richiesta di chiarimento")
|
105 |
+
chat_engine.reset()
|
106 |
|
107 |
else:
|
108 |
+
|
109 |
+
|
110 |
# The index is already built, no need to rebuild it.
|
111 |
storage_context = StorageContext.from_defaults(persist_dir=PERSIST_DIR)
|
112 |
index = load_index_from_storage(storage_context)
|