Spaces:
Running
Running
Update ui.py
Browse files
ui.py
CHANGED
@@ -65,7 +65,7 @@ def APP():
|
|
65 |
st.markdown("<p style='color:white;background-color:orange;font-weight:bold'> Nanobody [CANCER targeted]</p>",unsafe_allow_html=True)
|
66 |
#with st.expander("info"):
|
67 |
#st.info("This Interface lets u specify a high level biological query (Protein Engineering Query) and execute the pipeline for the end product i.e Engineered Nanobody",icon=":material/info:")
|
68 |
-
projects=
|
69 |
projectname=None
|
70 |
|
71 |
with st.form("bio",border=False):
|
@@ -84,11 +84,14 @@ def APP():
|
|
84 |
"Authorization":f"Bearer {tok}"
|
85 |
})
|
86 |
response_json=response.json()
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
90 |
|
|
|
91 |
|
|
|
92 |
|
93 |
#project_details=response.json()
|
94 |
#if project_details.get("projectname") !=None or project_details.get("projectname") !="":
|
@@ -98,16 +101,23 @@ def APP():
|
|
98 |
scan_for_project_availability(st.user.email)
|
99 |
|
100 |
|
101 |
-
if projects
|
102 |
|
|
|
|
|
|
|
|
|
|
|
103 |
|
104 |
-
projectname
|
105 |
-
|
106 |
-
|
107 |
-
with st.expander("Set up the project before proceeding."):
|
108 |
-
projectname = st.text_input("Provide project name > ")
|
109 |
|
110 |
-
|
|
|
|
|
|
|
|
|
111 |
|
112 |
bio_input = st.text_area(
|
113 |
"Protein Engineering Query",
|
@@ -117,7 +127,7 @@ def APP():
|
|
117 |
|
118 |
if execute_button:
|
119 |
|
120 |
-
if
|
121 |
st.markdown(":orange-badge[⚠️ Set Projectname]")
|
122 |
else:
|
123 |
|
|
|
65 |
st.markdown("<p style='color:white;background-color:orange;font-weight:bold'> Nanobody [CANCER targeted]</p>",unsafe_allow_html=True)
|
66 |
#with st.expander("info"):
|
67 |
#st.info("This Interface lets u specify a high level biological query (Protein Engineering Query) and execute the pipeline for the end product i.e Engineered Nanobody",icon=":material/info:")
|
68 |
+
projects=[]
|
69 |
projectname=None
|
70 |
|
71 |
with st.form("bio",border=False):
|
|
|
84 |
"Authorization":f"Bearer {tok}"
|
85 |
})
|
86 |
response_json=response.json()
|
87 |
+
pros=response_json.get("projects")
|
88 |
+
for pro in pros:
|
89 |
+
projects.append(pro.get("project"))
|
90 |
+
|
91 |
|
92 |
+
#st.session_state.projects=projects
|
93 |
|
94 |
+
|
95 |
|
96 |
#project_details=response.json()
|
97 |
#if project_details.get("projectname") !=None or project_details.get("projectname") !="":
|
|
|
101 |
scan_for_project_availability(st.user.email)
|
102 |
|
103 |
|
104 |
+
if len(projects) > 0 :
|
105 |
|
106 |
+
option = st.selectbox(
|
107 |
+
"selectproject",
|
108 |
+
projects
|
109 |
+
)
|
110 |
+
projectname = option
|
111 |
|
112 |
+
#if projectname == "":
|
113 |
+
# with st.expander("Set up the project before proceeding."):
|
114 |
+
# projectname = st.text_input("Provide project name > ")
|
|
|
|
|
115 |
|
116 |
+
elif len(projects) == 0:
|
117 |
+
|
118 |
+
p_name=st.text_input("enter project name : ")
|
119 |
+
projectname=p_name
|
120 |
+
|
121 |
|
122 |
bio_input = st.text_area(
|
123 |
"Protein Engineering Query",
|
|
|
127 |
|
128 |
if execute_button:
|
129 |
|
130 |
+
if projectname == None:
|
131 |
st.markdown(":orange-badge[⚠️ Set Projectname]")
|
132 |
else:
|
133 |
|