Spaces:
Running
Running
Update pages/biolab.py
Browse files- pages/biolab.py +32 -21
pages/biolab.py
CHANGED
@@ -2,31 +2,42 @@ import streamlit as st
|
|
2 |
|
3 |
# --- Page Configuration (Optional but good practice) ---
|
4 |
st.set_page_config(
|
5 |
-
page_title="
|
6 |
page_icon=":computer:",
|
7 |
layout="wide",
|
8 |
initial_sidebar_state="collapsed"
|
9 |
)
|
10 |
|
11 |
-
st.subheader("Output Console")
|
12 |
-
console_container = st.container(height=300, border=True)
|
13 |
|
14 |
-
|
15 |
-
st.code(">>> Ready for input...", language="bash") # Use st.code for a console look
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
# --- Page Configuration (Optional but good practice) ---
|
4 |
st.set_page_config(
|
5 |
+
page_title="BIOLAB",
|
6 |
page_icon=":computer:",
|
7 |
layout="wide",
|
8 |
initial_sidebar_state="collapsed"
|
9 |
)
|
10 |
|
|
|
|
|
11 |
|
12 |
+
col1 , col2 = st.columns(2)
|
|
|
13 |
|
14 |
+
|
15 |
+
with col1:
|
16 |
+
|
17 |
+
console_container = st.container(height=300, border=True)
|
18 |
+
|
19 |
+
with console_container:
|
20 |
+
st.code(">>> Ready for input...", language="bash") # Use st.code for a console look
|
21 |
+
|
22 |
+
st.text("Protein Engineering Query Here :")
|
23 |
+
user_input = st.text_input(
|
24 |
+
"Enter your long text below:",
|
25 |
+
#height=100, # Makes the text area tall
|
26 |
+
placeholder="Type something lengthy here... It could be code, a story, or just a lot of thoughts."
|
27 |
+
)
|
28 |
+
if st.button("Execute", use_container_width=True):
|
29 |
+
if user_input:
|
30 |
+
# Simulate processing and append to the console
|
31 |
+
with console_container:
|
32 |
+
st.markdown(f"**>>> Processing input...**")
|
33 |
+
st.code(f"Input received ({len(user_input)} characters):\n{user_input[:200]}...", language="text") # Show first 200 chars
|
34 |
+
st.success("Task completed!")
|
35 |
+
else:
|
36 |
+
with console_container:
|
37 |
+
st.warning(">>> Please enter some text before processing.")
|
38 |
+
|
39 |
+
with col2:
|
40 |
+
st.write("Status Here")
|
41 |
+
|
42 |
+
|
43 |
+
|