Update app.py
Browse files
app.py
CHANGED
@@ -7,16 +7,16 @@ import os
|
|
7 |
|
8 |
|
9 |
cache = {}
|
10 |
-
cache
|
11 |
-
cache
|
12 |
-
cache
|
13 |
-
cache
|
14 |
|
15 |
def chatbot(indexName, input_text):
|
16 |
"""
|
17 |
Chatbot function that takes in a prompt and returns a response
|
18 |
"""
|
19 |
-
index = cache
|
20 |
response = index.query(input_text, response_mode="compact")
|
21 |
return response.response
|
22 |
|
|
|
7 |
|
8 |
|
9 |
cache = {}
|
10 |
+
cache["RetroFeedback"]= GPTSimpleVectorIndex.load_from_disk('RetroFeedback.json'))
|
11 |
+
cache["Snowflake"]= GPTSimpleVectorIndex.load_from_disk('Snowflake.json'))
|
12 |
+
cache["Datadog"]= GPTSimpleVectorIndex.load_from_disk('Datadog.json'))
|
13 |
+
cache["Databricks"]= GPTSimpleVectorIndex.load_from_disk('Databricks.json'))
|
14 |
|
15 |
def chatbot(indexName, input_text):
|
16 |
"""
|
17 |
Chatbot function that takes in a prompt and returns a response
|
18 |
"""
|
19 |
+
index = cache[indexName]
|
20 |
response = index.query(input_text, response_mode="compact")
|
21 |
return response.response
|
22 |
|