Spaces:
Running
Running
Update pages/biolab.py
Browse files- pages/biolab.py +33 -28
pages/biolab.py
CHANGED
@@ -12,6 +12,7 @@ st.set_page_config(
|
|
12 |
)
|
13 |
|
14 |
|
|
|
15 |
if 'logged_in' not in st.session_state:
|
16 |
st.session_state.logged_in = False
|
17 |
|
@@ -40,6 +41,8 @@ def authenticate_user(username,password):
|
|
40 |
return False
|
41 |
|
42 |
|
|
|
|
|
43 |
def LOGIN():
|
44 |
|
45 |
st.text("Authentication System")
|
@@ -69,48 +72,50 @@ def LOGIN():
|
|
69 |
def APP():
|
70 |
|
71 |
st.title("newMATTER")
|
72 |
-
|
|
|
|
|
73 |
|
74 |
-
|
75 |
|
76 |
-
|
77 |
|
78 |
-
|
79 |
|
80 |
-
|
81 |
-
|
82 |
|
83 |
|
84 |
|
85 |
-
|
86 |
-
|
87 |
|
88 |
-
|
89 |
|
90 |
-
|
91 |
-
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
# Simulate processing and append to the console
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
|
108 |
|
109 |
-
|
110 |
-
|
111 |
|
112 |
-
|
113 |
-
|
114 |
|
115 |
|
116 |
|
|
|
12 |
)
|
13 |
|
14 |
|
15 |
+
|
16 |
if 'logged_in' not in st.session_state:
|
17 |
st.session_state.logged_in = False
|
18 |
|
|
|
41 |
return False
|
42 |
|
43 |
|
44 |
+
|
45 |
+
|
46 |
def LOGIN():
|
47 |
|
48 |
st.text("Authentication System")
|
|
|
72 |
def APP():
|
73 |
|
74 |
st.title("newMATTER")
|
75 |
+
st.markdown("> Engineering Programmable Biology")
|
76 |
+
with st.container(border=True):
|
77 |
+
tab1, tab2, tab3 = st.tabs(["PROTEIN ENGINEERING LAB", "EXECUTED OPERATIONS", "LAB OUTPUT"])
|
78 |
|
79 |
+
def SHOW_PROJECT_NAME():
|
80 |
|
81 |
+
st.header(f"setup your project @ {st.session_state.username}")
|
82 |
|
83 |
+
project_name=st.text_input("enter project name ")
|
84 |
|
85 |
+
st.session_state.projectname=project_name
|
86 |
+
st.rerun()
|
87 |
|
88 |
|
89 |
|
90 |
+
def SHOWTABS():
|
91 |
+
with tab1:
|
92 |
|
93 |
+
console_container = st.container(height=150, border=True)
|
94 |
|
95 |
+
with console_container:
|
96 |
+
st.code(">>> System Online...", language="bash") # Use st.code for a console look
|
97 |
|
98 |
+
user_input = st.text_input(
|
99 |
+
"Protein Engineering Query",
|
100 |
+
placeholder="Type your query here."
|
101 |
+
)
|
102 |
+
if st.button("Execute", use_container_width=True):
|
103 |
+
if user_input:
|
104 |
# Simulate processing and append to the console
|
105 |
+
with console_container:
|
106 |
+
st.markdown(f"**>>> Processing input...**")
|
107 |
+
st.code(f"Input received ({len(user_input)} characters):\n{user_input[:200]}...", language="text") # Show first 200 chars
|
108 |
+
st.success("Task completed!")
|
109 |
+
else:
|
110 |
+
with console_container:
|
111 |
+
st.warning(">>> Please enter some text before processing.")
|
112 |
|
113 |
|
114 |
+
with tab2:
|
115 |
+
st.markdown("### Operations")
|
116 |
|
117 |
+
with tab3:
|
118 |
+
st.markdown("### Output")
|
119 |
|
120 |
|
121 |
|