Spaces:
Sleeping
Sleeping
Update app.py
Browse files1614 unmodified lines16151616161716181619162016211166 unmodified lines27882789279027912792279327945 unmodified lines280028012802280328042805280620 unmodified lines28272828282928302831283228331614 unmodified linesmax_length = len(str(cell.value))except:passws.column_dimensions[get_column_letter(col[0].column)].width = min(max_length + 2, 50)output = BytesIO()wb.save(output)1166 unmodified linesrender_file_suggestions()for role, msg in st.session_state.chat_history[-20:]:avatar = "M" if role == "assistant" else "👤"with st.chat_message(role, avatar=avatar):st.markdown(msg)5 unmodified lineswith st.chat_message("user", avatar="👤"):st.markdown(query)st.session_state.chat_history.append(("user", query))with st.chat_message("assistant", avatar="M"):msg = ("↩️ Done — restored the previous version."if smart_rollback() else "⚠️ Nothing to undo.")st.markdown(msg)20 unmodified linesand not q_lower.startswith("/"))with st.chat_message("assistant", avatar="M"):if is_edit:resp_ph = st.empty()meta_ph = st.empty()1614 unmodified lines16151616161716181619162016211166 unmodified lines27882789279027912792279327945 unmodified lines280028012802280328042805280620 unmodified lines28272828282928302831283228331614 unmodified linesmax_length = len(str(cell.value))except:passws.column_dimensions[get_column_letter(col[0].column)] = min(max_length + 2, 50)output = BytesIO()wb.save(output)1166 unmodified linesrender_file_suggestions()for role, msg in st.session_state.chat_history[-20:]:avatar = "🤖" if role == "assistant" else "👤"with st.chat_message(role, avatar=avatar):st.markdown(msg)5 unmodified lineswith st.chat_message("user", avatar="👤"):st.markdown(query)st.session_state.chat_history.append(("user", query))with st.chat_message("assistant", avatar="🤖"):msg = ("↩️ Done — restored the previous version."if smart_rollback() else "⚠️ Nothing to undo.")st.markdown(msg)20 unmodified linesand not q_lower.startswith("/"))with st.chat_message("assistant", avatar="🤖"):if is_edit:resp_ph = st.empty()meta_ph = st.empty()
app.py+4-4