Spaces:
Runtime error
Runtime error
fix: full history with input
Browse files
app.py
CHANGED
@@ -863,7 +863,7 @@ class Chatbot(gr.Chatbot):
|
|
863 |
result = result.replace('؛','\n').replace('/',' ** ').strip()
|
864 |
result = result[:result.rfind('\n')] # filter till the end verse, do not publish not complete verses
|
865 |
|
866 |
-
print('Message Pairs: ',message_pair[0],message_pair[1], result)
|
867 |
|
868 |
processed_messages.append(
|
869 |
[
|
@@ -970,7 +970,7 @@ class ChatInterface(gr.ChatInterface):
|
|
970 |
request: Request,
|
971 |
*args,
|
972 |
) -> AsyncGenerator:
|
973 |
-
history = history_with_input[:-1]
|
974 |
|
975 |
print(f'Message is {message}')
|
976 |
if len(message)==0:
|
@@ -1008,7 +1008,7 @@ class ChatInterface(gr.ChatInterface):
|
|
1008 |
request: Request,
|
1009 |
*args,
|
1010 |
) -> tuple[list[list[str | None]], list[list[str | None]]]:
|
1011 |
-
history = history_with_input[:-1]
|
1012 |
|
1013 |
inputs, _, _ = special_args(
|
1014 |
self.fn, inputs=[message, history, *args], request=request
|
|
|
863 |
result = result.replace('؛','\n').replace('/',' ** ').strip()
|
864 |
result = result[:result.rfind('\n')] # filter till the end verse, do not publish not complete verses
|
865 |
|
866 |
+
#print('Message Pairs: ',message_pair[0],message_pair[1], result)
|
867 |
|
868 |
processed_messages.append(
|
869 |
[
|
|
|
970 |
request: Request,
|
971 |
*args,
|
972 |
) -> AsyncGenerator:
|
973 |
+
history = history_with_input #[:-1]
|
974 |
|
975 |
print(f'Message is {message}')
|
976 |
if len(message)==0:
|
|
|
1008 |
request: Request,
|
1009 |
*args,
|
1010 |
) -> tuple[list[list[str | None]], list[list[str | None]]]:
|
1011 |
+
history = history_with_input #[:-1]
|
1012 |
|
1013 |
inputs, _, _ = special_args(
|
1014 |
self.fn, inputs=[message, history, *args], request=request
|