MCPcopy Create free account
hub / github.com/danielmiessler/Fabric / main

Function main

scripts/python_ui/streamlit.py:1403–2000  ·  view source on GitHub ↗

Main function to run the Streamlit app.

()

Source from the content-addressed store, hash-verified

1401
1402
1403def main():
1404 """Main function to run the Streamlit app."""
1405 logger.info("Starting Fabric Pattern Studio")
1406 try:
1407 # Set page config
1408 st.set_page_config(
1409 page_title="Fabric Pattern Studio",
1410 page_icon="🧬",
1411 layout="wide",
1412 initial_sidebar_state="expanded",
1413 )
1414
1415 # Ask for the token if FABRIC_UI_TOKEN is set.
1416 _require_access_token()
1417
1418 # Add title with gradient styling and footer signature
1419 st.markdown(
1420 """
1421 <style>
1422 [data-testid="stHeader"] {
1423 background-color: rgba(0,0,0,0);
1424 }
1425 .fabric-header {
1426 padding: 1rem;
1427 margin-bottom: 1rem;
1428 background: linear-gradient(90deg, rgba(155, 108, 255, 0.1) 0%, rgba(76, 181, 255, 0.1) 100%);
1429 border-radius: 8px;
1430 }
1431 .fabric-title {
1432 font-size: 2.5em;
1433 margin: 0;
1434 background: linear-gradient(90deg, #9B6CFF 0%, #4CB5FF 100%);
1435 -webkit-background-clip: text;
1436 -webkit-text-fill-color: transparent;
1437 font-weight: 600;
1438 text-align: center;
1439 }
1440 .assistant-container {
1441 position: fixed;
1442 right: 20px;
1443 bottom: 40px;
1444 display: flex;
1445 flex-direction: column;
1446 align-items: center;
1447 gap: 8px;
1448 z-index: 1000;
1449 }
1450 .assistant-avatar {
1451 width: 42px;
1452 height: 42px;
1453 background: rgba(155, 108, 255, 0.05);
1454 border: 2px solid rgba(155, 108, 255, 0.1);
1455 border-radius: 50%;
1456 display: flex;
1457 align-items: center;
1458 justify-content: center;
1459 cursor: pointer;
1460 transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

Callers 1

streamlit.pyFile · 0.70

Calls 15

_require_access_tokenFunction · 0.85
initialize_session_stateFunction · 0.85
load_configurationFunction · 0.85
get_patternsFunction · 0.85
get_pattern_metadataFunction · 0.85
get_clipboard_contentFunction · 0.85
validate_input_contentFunction · 0.85
sanitize_input_contentFunction · 0.85
enhance_input_previewFunction · 0.85
execute_pattern_chainFunction · 0.85
execute_patternsFunction · 0.85

Tested by

no test coverage detected