Aye10032
commited on
Commit
·
fc71734
1
Parent(s):
89654e5
update
Browse files
pages/AcademicTranslate.py
CHANGED
@@ -26,11 +26,7 @@ with st.sidebar:
|
|
26 |
if 'ac_translate_history' not in st.session_state:
|
27 |
st.session_state.ac_translate_history = []
|
28 |
|
29 |
-
|
30 |
-
st.session_state.ac_markdown_text = ''
|
31 |
-
|
32 |
-
chat_container = st.container(height=580, border=False)
|
33 |
-
st.code(st.session_state.ac_markdown_text, language='markdown')
|
34 |
|
35 |
with chat_container:
|
36 |
for message in st.session_state.ac_translate_history:
|
@@ -82,4 +78,3 @@ if prompt := st.chat_input():
|
|
82 |
response = ac_translate(prompt, st.session_state.get('is_en2zh'))
|
83 |
translate_result = chat_container.chat_message("ai").write_stream(response)
|
84 |
st.session_state.ac_translate_history.append({'role': 'assistant', 'content': translate_result})
|
85 |
-
st.session_state.ac_markdown_text = translate_result
|
|
|
26 |
if 'ac_translate_history' not in st.session_state:
|
27 |
st.session_state.ac_translate_history = []
|
28 |
|
29 |
+
chat_container = st.container(height=610, border=False)
|
|
|
|
|
|
|
|
|
30 |
|
31 |
with chat_container:
|
32 |
for message in st.session_state.ac_translate_history:
|
|
|
78 |
response = ac_translate(prompt, st.session_state.get('is_en2zh'))
|
79 |
translate_result = chat_container.chat_message("ai").write_stream(response)
|
80 |
st.session_state.ac_translate_history.append({'role': 'assistant', 'content': translate_result})
|
|