drop Rerun button

This commit is contained in:
if 2023-03-28 01:13:32 +03:00
parent 9b11d9fd6b
commit ee35c976b4
2 changed files with 3 additions and 7 deletions

View File

@ -18,12 +18,11 @@ def get_user_input():
def show_chat_buttons() -> None:
b0, b1, b2, b4 = st.columns(4)
b0, b1, b2 = st.columns(3)
with b0, b1, b2:
b0.button(label=st.session_state.locale.chat_run_btn)
b1.button(label=st.session_state.locale.chat_rerun_btn, on_click=st.cache_data.clear)
b2.button(label=st.session_state.locale.chat_clear_btn, on_click=clear_chat)
b4.download_button(
b1.button(label=st.session_state.locale.chat_clear_btn, on_click=clear_chat)
b2.download_button(
label=st.session_state.locale.chat_save_btn,
data="\n".join([str(d) for d in st.session_state.messages[1:]]),
file_name="ai-talks-chat.json",

View File

@ -15,7 +15,6 @@ class Locale:
donates2: str
chat_placeholder: str
chat_run_btn: str
chat_rerun_btn: str
chat_clear_btn: str
chat_save_btn: str
select_placeholder1: str
@ -40,7 +39,6 @@ class EnLocale(Locale):
donates2: str = "World"
chat_placeholder: str = "Start Your Conversation With AI:"
chat_run_btn: str = "Run"
chat_rerun_btn: str = "Rerun"
chat_clear_btn: str = "Clear Chat"
chat_save_btn: str = "Save Chat"
select_placeholder1: str = "Select AI Model"
@ -65,7 +63,6 @@ class RuLocale(Locale):
donates2: str = "Остальной Мир"
chat_placeholder: str = "Начните Вашу Беседу с ИИ:"
chat_run_btn: str = "Запустить"
chat_rerun_btn: str = "Перезапустить"
chat_clear_btn: str = "Очистить Чат"
chat_save_btn: str = "Сохранить Чат"
select_placeholder1: str = "Выберите Модель ИИ"