Prakh24s commited on
Commit
f518c40
·
verified ·
1 Parent(s): 6aa451c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -36,7 +36,7 @@ def chat_interface(user_input):
36
 
37
  response = generate_response(messages)
38
  chat_metadata.append({"role":"user"})
39
- chat_history.append(input_text)
40
  chat_metadata.append({"role":"assistant"})
41
  chat_history.append(response.content)
42
  current_id += 1
@@ -48,7 +48,7 @@ def chat_interface(user_input):
48
  metadatas=chat_metadata,
49
  ids=history_ids
50
  )
51
- return response
52
 
53
  def main():
54
  interface = gr.Interface(fn=chat_interface, inputs="text", outputs="text", title="Chatbot Interface")
 
36
 
37
  response = generate_response(messages)
38
  chat_metadata.append({"role":"user"})
39
+ chat_history.append(user_input)
40
  chat_metadata.append({"role":"assistant"})
41
  chat_history.append(response.content)
42
  current_id += 1
 
48
  metadatas=chat_metadata,
49
  ids=history_ids
50
  )
51
+ return response.content
52
 
53
  def main():
54
  interface = gr.Interface(fn=chat_interface, inputs="text", outputs="text", title="Chatbot Interface")