Spaces:
Sleeping
Sleeping
vtrv.vls
commited on
Commit
·
fa1a2c3
1
Parent(s):
9813584
Functionality rework
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ def model_gen(
|
|
34 |
if len(content) == 0:
|
35 |
return '', []
|
36 |
|
37 |
-
chat_history = chat_history[-1] if no_context else chat_history
|
38 |
|
39 |
return model_response(
|
40 |
content,
|
@@ -63,10 +63,6 @@ def model_regen(
|
|
63 |
|
64 |
chat_history = chat_history[-1] if no_context else chat_history
|
65 |
content = copy(chat_history[-1][0])
|
66 |
-
|
67 |
-
print('---- regen')
|
68 |
-
print(content)
|
69 |
-
print(chat_history[:-1])
|
70 |
|
71 |
return model_response(
|
72 |
content,
|
|
|
34 |
if len(content) == 0:
|
35 |
return '', []
|
36 |
|
37 |
+
chat_history = chat_history[-1] if no_context and len(chat_history)>1 else chat_history
|
38 |
|
39 |
return model_response(
|
40 |
content,
|
|
|
63 |
|
64 |
chat_history = chat_history[-1] if no_context else chat_history
|
65 |
content = copy(chat_history[-1][0])
|
|
|
|
|
|
|
|
|
66 |
|
67 |
return model_response(
|
68 |
content,
|