KvrParaskevi commited on
Commit
f3b0cae
·
verified ·
1 Parent(s): ecc901e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -31,14 +31,13 @@ def load_pipeline():
31
 
32
  @spaces.GPU
33
  def chat_interface(inputs):
34
- question = inputs["input"]
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": question, "history": chat_history})
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()