@@ -228,6 +228,7 @@ def wrapper():
228
228
pass
229
229
print("Xformers is not installed. Proceeding without it")
230
230
231
+ chat_history = None
231
232
chat_dir = None
232
233
tts_model = None
233
234
whisper_model = None
@@ -1035,7 +1036,7 @@ def image_to_base64_data_uri(image_path):
1035
1036
1036
1037
text = ""
1037
1038
if not chat_history or chat_history[-1][1] is not None:
1038
- chat_history.append([prompt, "" ])
1039
+ chat_history.append([prompt, text ])
1039
1040
1040
1041
for i in range(max_length):
1041
1042
@@ -1074,7 +1075,7 @@ def image_to_base64_data_uri(image_path):
1074
1075
elif llm_model_type == "llama":
1075
1076
text = ""
1076
1077
if not chat_history or chat_history[-1][1] is not None:
1077
- chat_history.append([prompt, "" ])
1078
+ chat_history.append([prompt, text ])
1078
1079
1079
1080
stop_sequences = [seq.strip() for seq in stopping.split(',')] if stopping.strip() else None
1080
1081
@@ -8611,7 +8612,7 @@ def reload_interface():
8611
8612
gr.Slider(minimum=1, maximum=200, value=40, step=1, label=_("Top K", lang)),
8612
8613
gr.Checkbox(label=_("Enable Do Sample", lang), value=False),
8613
8614
gr.Checkbox(label=_("Enable Early Stopping", lang), value=False),
8614
- gr.Textbox(label=_("Stop sequences (optional)", lang), value=""),
8615
+ gr.Textbox(label=_("Stop sequences (optional)", lang), value="Human: "),
8615
8616
gr.Slider(minimum=0.1, maximum=2.0, value=1.0, step=0.1, label=_("Repetition penalty", lang)),
8616
8617
gr.Slider(minimum=0.1, maximum=2.0, value=0.0, step=0.1, label=_("Frequency penalty", lang)),
8617
8618
gr.Slider(minimum=0.1, maximum=2.0, value=0.0, step=0.1, label=_("Presence penalty", lang)),
0 commit comments