Spaces:
Running
Running
Update ui.py
Browse files
ui.py
CHANGED
@@ -119,13 +119,14 @@ def APP():
|
|
119 |
projectname=p_name
|
120 |
|
121 |
|
122 |
-
bio_input = st.text_area(
|
123 |
-
|
124 |
-
|
125 |
-
)
|
126 |
-
execute_button=st.form_submit_button("execute")
|
127 |
-
|
128 |
-
|
|
|
129 |
|
130 |
|
131 |
"""----------------experimental--------------------"""
|
@@ -140,14 +141,23 @@ def APP():
|
|
140 |
useroperations_json=response.json()
|
141 |
return useroperations_json
|
142 |
|
143 |
-
fetch_ops()
|
144 |
-
"""---------------experimental---------------------"""
|
145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
|
147 |
-
if
|
|
|
|
|
|
|
|
|
148 |
|
149 |
if projectname == None:
|
150 |
-
st.markdown(":orange-badge[⚠️
|
151 |
else:
|
152 |
|
153 |
payload={
|
@@ -167,8 +177,13 @@ def APP():
|
|
167 |
plan_response=response.json()
|
168 |
|
169 |
|
170 |
-
|
171 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
172 |
|
173 |
|
174 |
if selection == 1:
|
|
|
119 |
projectname=p_name
|
120 |
|
121 |
|
122 |
+
#bio_input = st.text_area(
|
123 |
+
# "Protein Engineering Query",
|
124 |
+
# placeholder="Type your query here."
|
125 |
+
#)
|
126 |
+
#execute_button=st.form_submit_button("execute")
|
127 |
+
bio_input = st.chat_input(" Ready for Action ! ")
|
128 |
+
|
129 |
+
|
130 |
|
131 |
|
132 |
"""----------------experimental--------------------"""
|
|
|
141 |
useroperations_json=response.json()
|
142 |
return useroperations_json
|
143 |
|
|
|
|
|
144 |
|
145 |
+
"""---------------experimental-----------------------"""
|
146 |
+
|
147 |
+
with st.container(border=True):
|
148 |
+
if len(st.session_state.messages) > 0:
|
149 |
+
for msg in st.session_state.messages:
|
150 |
+
with st.chat_message(msg["role"]):
|
151 |
+
st.markdown(msg["content"])
|
152 |
|
153 |
+
if bio_input:
|
154 |
+
|
155 |
+
st.session_state.messages.append({"role":"user","content":bio_input})
|
156 |
+
with st.chat_message("user"):
|
157 |
+
st.markdown(user_input)
|
158 |
|
159 |
if projectname == None:
|
160 |
+
st.markdown(":orange-badge[⚠️Set Projectname]")
|
161 |
else:
|
162 |
|
163 |
payload={
|
|
|
177 |
plan_response=response.json()
|
178 |
|
179 |
|
180 |
+
#st.markdown(f"## {plan_response}")
|
181 |
+
with st.chat_message("assistant"):
|
182 |
+
st.markdown(plan_response)
|
183 |
+
|
184 |
+
|
185 |
+
|
186 |
+
st.session_state.messages.append({"role":"assistant","content":plan_response})
|
187 |
|
188 |
|
189 |
if selection == 1:
|