Add shared.is_chat() function
This commit is contained in:
@@ -11,7 +11,7 @@ def get_prompt_by_name(name):
|
||||
return df[df['Prompt name'] == name].iloc[0]['Prompt'].replace('\\n', '\n')
|
||||
|
||||
def ui():
|
||||
if not shared.args.chat or shared.args.cai_chat:
|
||||
if not shared.is_chat():
|
||||
choices = ['None'] + list(df['Prompt name'])
|
||||
|
||||
prompts_menu = gr.Dropdown(value=choices[0], choices=choices, label='Prompt')
|
||||
|
||||
@@ -74,7 +74,7 @@ def input_modifier(string):
|
||||
"""
|
||||
|
||||
# Remove autoplay from the last reply
|
||||
if (shared.args.chat or shared.args.cai_chat) and len(shared.history['internal']) > 0:
|
||||
if shared.is_chat() and len(shared.history['internal']) > 0:
|
||||
shared.history['visible'][-1] = [shared.history['visible'][-1][0], shared.history['visible'][-1][1].replace('controls autoplay>','controls>')]
|
||||
|
||||
shared.processing_message = "*Is recording a voice message...*"
|
||||
|
||||
Reference in New Issue
Block a user