Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -31,14 +31,13 @@ def load_pipeline():
|
|
31 |
|
32 |
@spaces.GPU
|
33 |
def chat_interface(inputs):
|
34 |
-
question = inputs
|
35 |
-
|
36 |
chat_history_tuples = []
|
37 |
for message in chat_history:
|
38 |
chat_history_tuples.append((message[0], message[1]))
|
39 |
|
40 |
#result = llm_chain({"input": query, "history": chat_history_tuples})
|
41 |
-
result = llm_chain.invoke({"input":
|
42 |
return result["response"]
|
43 |
|
44 |
llm = load_pipeline()
|
|
|
31 |
|
32 |
@spaces.GPU
|
33 |
def chat_interface(inputs):
|
34 |
+
question = inputs
|
|
|
35 |
chat_history_tuples = []
|
36 |
for message in chat_history:
|
37 |
chat_history_tuples.append((message[0], message[1]))
|
38 |
|
39 |
#result = llm_chain({"input": query, "history": chat_history_tuples})
|
40 |
+
result = llm_chain.invoke({"input": inputs, "history": chat_history})
|
41 |
return result["response"]
|
42 |
|
43 |
llm = load_pipeline()
|