Make the code more like PEP8

This commit is contained in:
oobabooga
2023-04-07 00:00:16 -03:00
parent 8e4e8dd741
commit 7b1b1d8e39
30 changed files with 314 additions and 177 deletions

View File

@@ -4,12 +4,14 @@ import pandas as pd
df = pd.read_csv("https://raw.githubusercontent.com/devbrones/llama-prompts/main/prompts/prompts.csv")
def get_prompt_by_name(name):
if name == 'None':
return ''
else:
return df[df['Prompt name'] == name].iloc[0]['Prompt'].replace('\\n', '\n')
def ui():
if not shared.is_chat():
choices = ['None'] + list(df['Prompt name'])