Add Save/Delete character buttons (#1870)
--------- Co-authored-by: oobabooga <112222186+oobabooga@users.noreply.github.com>
This commit is contained in:
parent
c5af549d4b
commit
ab6acddcc5
3 changed files with 92 additions and 6 deletions
|
@ -15,6 +15,9 @@ with open(Path(__file__).resolve().parent / '../css/chat.js', 'r') as f:
|
|||
chat_js = f.read()
|
||||
|
||||
refresh_symbol = '\U0001f504' # 🔄
|
||||
delete_symbol = '🗑️'
|
||||
save_symbol = '💾'
|
||||
|
||||
theme = gr.themes.Default(
|
||||
font=['Helvetica', 'ui-sans-serif', 'system-ui', 'sans-serif'],
|
||||
font_mono=['IBM Plex Mono', 'ui-monospace', 'Consolas', 'monospace'],
|
||||
|
@ -89,3 +92,11 @@ def create_refresh_button(refresh_component, refresh_method, refreshed_args, ele
|
|||
outputs=[refresh_component]
|
||||
)
|
||||
return refresh_button
|
||||
|
||||
|
||||
def create_delete_button(**kwargs):
|
||||
return ToolButton(value=delete_symbol, **kwargs)
|
||||
|
||||
|
||||
def create_save_button(**kwargs):
|
||||
return ToolButton(value=save_symbol, **kwargs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue