Spaces:
Running
Running
import streamlit as st | |
def APP(): | |
st.title("newMATTER") | |
st.markdown("> Engineering Programmable Biology") | |
tab1, tab2, tab3 = st.tabs(["PROTEIN ENGINEERING LAB", "EXECUTED OPERATIONS", "LAB OUTPUT"]) | |
def SHOW_PROJECT_NAME(): | |
st.header(f"setup your project @ {st.session_state.username}") | |
project_name=st.text_input("enter project name ") | |
st.session_state.projectname=project_name | |
st.rerun() | |
def SHOWTABS(): | |
st.markdown(""" | |
<style> | |
@keyframes blink { | |
0% { opacity: 1; } | |
50% { opacity: 0; } | |
100% { opacity: 1; } | |
} | |
.blinking-text { | |
animation: blink 2s infinite; | |
font-size: 20px; | |
font-weight: bold; | |
color: red; | |
} | |
</style> | |
""", unsafe_allow_html=True) | |
st.markdown('<div class="blinking-text"> CAUTION ! </div>', unsafe_allow_html=True) | |
with tab1: | |
console_container = st.container(height=100, border=False) | |
with console_container: | |
st.code(">>> Online...", language="rust") # Use st.code for a console look | |
user_input = st.text_area( | |
"Protein Engineering Query", | |
placeholder="Type your query here." | |
) | |
if st.button("Execute", use_container_width=True): | |
output=None | |
if output: | |
# Simulate processing and append to the console | |
with console_container: | |
st.code(f"> {output}", language="rust") # Show first 200 chars | |
st.success("Task completed!") | |
else: | |
with console_container: | |
st.warning(">>>Error") | |
with tab2: | |
st.markdown("### Operations") | |
with tab3: | |
st.markdown("### Output") | |
if st.session_state.projectname is not "": | |
SHOWTABS() | |
else: | |
SHOW_PROJECT_NAME() |