Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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(
|
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")
|