Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -196,12 +196,11 @@ stop = False
|
|
196 |
st.title("Chatbot Demo")
|
197 |
|
198 |
with st.container():
|
199 |
-
assistant_role_name = st.text_input("
|
200 |
-
user_role_name = st.text_input("
|
201 |
task = st.text_input("Task", value="Discuss the best tourist attractions to see in Singapore")
|
202 |
word_limit = st.slider("Word limit", min_value=0, max_value=50, value=15)
|
203 |
chat_turn_limit = st.slider("Max. Messages", min_value=0, max_value=30, value=10)
|
204 |
-
specified_task_container = st.empty()
|
205 |
|
206 |
with st.container():
|
207 |
chat_container = st.empty()
|
@@ -216,7 +215,7 @@ with st.container():
|
|
216 |
if gen_button:
|
217 |
specified_task = get_specified_task(assistant_role_name, user_role_name, task, word_limit)
|
218 |
with chat_container.container():
|
219 |
-
st.
|
220 |
|
221 |
if stop_button:
|
222 |
stop = True
|
@@ -224,7 +223,7 @@ if stop_button:
|
|
224 |
|
225 |
if init_button:
|
226 |
# Initialize agents
|
227 |
-
assistant_sys_msg, user_sys_msg = get_sys_msgs(assistant_role_name, user_role_name,
|
228 |
assistant_agent = CAMELAgent(assistant_sys_msg, ChatOpenAI(temperature=0.2))
|
229 |
user_agent = CAMELAgent(user_sys_msg, ChatOpenAI(temperature=0.2))
|
230 |
|
|
|
196 |
st.title("Chatbot Demo")
|
197 |
|
198 |
with st.container():
|
199 |
+
assistant_role_name = st.text_input("Assistant-AI", value="Singapore Tourism Board")
|
200 |
+
user_role_name = st.text_input("User-AI", value="Tourist that has never been to Singapore")
|
201 |
task = st.text_input("Task", value="Discuss the best tourist attractions to see in Singapore")
|
202 |
word_limit = st.slider("Word limit", min_value=0, max_value=50, value=15)
|
203 |
chat_turn_limit = st.slider("Max. Messages", min_value=0, max_value=30, value=10)
|
|
|
204 |
|
205 |
with st.container():
|
206 |
chat_container = st.empty()
|
|
|
215 |
if gen_button:
|
216 |
specified_task = get_specified_task(assistant_role_name, user_role_name, task, word_limit)
|
217 |
with chat_container.container():
|
218 |
+
task = st.text_input("Task", value=specified_task)
|
219 |
|
220 |
if stop_button:
|
221 |
stop = True
|
|
|
223 |
|
224 |
if init_button:
|
225 |
# Initialize agents
|
226 |
+
assistant_sys_msg, user_sys_msg = get_sys_msgs(assistant_role_name, user_role_name, task)
|
227 |
assistant_agent = CAMELAgent(assistant_sys_msg, ChatOpenAI(temperature=0.2))
|
228 |
user_agent = CAMELAgent(user_sys_msg, ChatOpenAI(temperature=0.2))
|
229 |
|