add Run button

This commit is contained in:
if 2023-03-23 15:51:53 +03:00
parent a3a95293d5
commit e709d776e9
2 changed files with 6 additions and 2 deletions

View File

@ -19,8 +19,9 @@ def get_user_input() -> str:
def show_chat_buttons() -> None: def show_chat_buttons() -> None:
b1, b2 = st.columns(2) b0, b1, b2 = st.columns(3)
with b1, b2: with b0, b1, b2:
b0.button(st.session_state.locale.chat_btn0)
b1.button(st.session_state.locale.chat_btn1, on_click=st.cache_data.clear) b1.button(st.session_state.locale.chat_btn1, on_click=st.cache_data.clear)
b2.button(st.session_state.locale.chat_btn2, on_click=clear_chat) b2.button(st.session_state.locale.chat_btn2, on_click=clear_chat)

View File

@ -14,6 +14,7 @@ class Locale:
donates1: str donates1: str
donates2: str donates2: str
chat_placeholder: str chat_placeholder: str
chat_btn0: str
chat_btn1: str chat_btn1: str
chat_btn2: str chat_btn2: str
select_placeholder1: str select_placeholder1: str
@ -32,6 +33,7 @@ class EnLocale(Locale):
donates1: str = "Russia" donates1: str = "Russia"
donates2: str = "World" donates2: str = "World"
chat_placeholder: str = "Start Your Conversation With AI:" chat_placeholder: str = "Start Your Conversation With AI:"
chat_btn0: str = "Run"
chat_btn1: str = "Rerun" chat_btn1: str = "Rerun"
chat_btn2: str = "Clear Conversation" chat_btn2: str = "Clear Conversation"
select_placeholder1: str = "Select AI Model" select_placeholder1: str = "Select AI Model"
@ -50,6 +52,7 @@ class RuLocale(Locale):
donates1: str = "Россия" donates1: str = "Россия"
donates2: str = "Остальной Мир" donates2: str = "Остальной Мир"
chat_placeholder: str = "Начните Вашу Беседу с ИИ:" chat_placeholder: str = "Начните Вашу Беседу с ИИ:"
chat_btn0: str = "Запустить"
chat_btn1: str = "Перезапустить" chat_btn1: str = "Перезапустить"
chat_btn2: str = "Очистить Беседу" chat_btn2: str = "Очистить Беседу"
select_placeholder1: str = "Выберите Модель ИИ" select_placeholder1: str = "Выберите Модель ИИ"