Junaidb commited on
Commit
bbff065
·
verified ·
1 Parent(s): 5cd8e23

Update ui.py

Browse files
Files changed (1) hide show
  1. ui.py +29 -29
ui.py CHANGED
@@ -7,18 +7,7 @@ def APP():
7
 
8
  tab1, tab2, tab3 = st.tabs(["PROTEIN ENGINEERING LAB", "EXECUTED OPERATIONS", "LAB OUTPUT"])
9
 
10
- def SHOW_PROJECT_NAME():
11
-
12
-
13
- st.header(f"setup your project @ {st.session_state.username}")
14
-
15
- project_name=st.text_input("enter project name ")
16
 
17
- st.session_state.projectname=project_name
18
-
19
- st.rerun()
20
-
21
-
22
 
23
  def SHOWTABS():
24
 
@@ -43,26 +32,37 @@ def APP():
43
  st.markdown('<div class="blinking-text"> CAUTION ! </div>', unsafe_allow_html=True)
44
 
45
  with tab1:
46
-
 
47
  console_container = st.container(height=100, border=False)
48
 
49
  with console_container:
50
  st.code(">>> Online...", language="rust") # Use st.code for a console look
51
 
52
- user_input = st.text_area(
53
- "Protein Engineering Query",
54
- placeholder="Type your query here."
55
- )
56
- if st.button("Execute", use_container_width=True):
57
 
58
- output=None
59
- if output:
60
- # Simulate processing and append to the console
61
- with console_container:
62
- st.code(f"> {output}", language="rust") # Show first 200 chars
63
- st.success("Task completed!")
64
- else:
65
- with console_container:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  st.warning(">>>Error")
67
 
68
 
@@ -74,8 +74,8 @@ def APP():
74
 
75
 
76
 
77
- if st.session_state.projectname != "":
78
- SHOWTABS()
79
 
80
- else:
81
- SHOW_PROJECT_NAME()
 
7
 
8
  tab1, tab2, tab3 = st.tabs(["PROTEIN ENGINEERING LAB", "EXECUTED OPERATIONS", "LAB OUTPUT"])
9
 
 
 
 
 
 
 
10
 
 
 
 
 
 
11
 
12
  def SHOWTABS():
13
 
 
32
  st.markdown('<div class="blinking-text"> CAUTION ! </div>', unsafe_allow_html=True)
33
 
34
  with tab1:
35
+
36
+
37
  console_container = st.container(height=100, border=False)
38
 
39
  with console_container:
40
  st.code(">>> Online...", language="rust") # Use st.code for a console look
41
 
 
 
 
 
 
42
 
43
+ with st.form("bio"):
44
+
45
+ st.header(f"setup your project name @ {st.session_state.username}")
46
+ project_name=st.text_input("enter project name ")
47
+ st.session_state.projectname=project_name
48
+ st.rerun()
49
+
50
+ user_input = st.text_area(
51
+ "Protein Engineering Query",
52
+ placeholder="Type your query here."
53
+ )
54
+ execute_button=st.form_submit_button("execute",use_container_width=True)
55
+
56
+ if execute_button:
57
+
58
+ st.session_state.projectname = project_name
59
+ output=None
60
+ if output:
61
+ with console_container:
62
+ st.code(f"> {output}", language="rust")
63
+ st.success("Task completed!")
64
+ else:
65
+ with console_container:
66
  st.warning(">>>Error")
67
 
68
 
 
74
 
75
 
76
 
77
+ #if st.session_state.projectname != "":
78
+ SHOWTABS()
79
 
80
+ #else:
81
+ #SHOW_PROJECT_NAME()