CrewAI-Studio / utils.py
zhengr's picture
init
58e0d8e
raw
history blame
No virus
696 Bytes
import random
import string
from streamlit import markdown
def rnd_id(length=8):
characters = string.ascii_letters + string.digits
random_text = ''.join(random.choice(characters) for _ in range(length))
return random_text
def escape_quotes(s):
return s.replace('"', '\\"').replace("'", "\\'")
def fix_columns_width():
markdown("""
<style>
div[data-testid="column"] {
width: fit-content !important;
flex: unset;
}
div[data-testid="column"] * {
width: fit-content !important;
}
</style>
""", unsafe_allow_html=True)