Yara Kyrychenko commited on
Commit ·
9103751
1
Parent(s): b0c5cee
upd path
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ from datetime import datetime
|
|
| 6 |
import random
|
| 7 |
|
| 8 |
st.set_page_config(
|
| 9 |
-
page_title="
|
| 10 |
page_icon="🤖",
|
| 11 |
initial_sidebar_state="expanded",
|
| 12 |
layout="wide"
|
|
@@ -34,13 +34,13 @@ def format_personalization(text):
|
|
| 34 |
return text
|
| 35 |
|
| 36 |
if 'inserted' not in st.session_state:
|
| 37 |
-
with open('
|
| 38 |
st.session_state.base_text = file.read()
|
| 39 |
-
with open('
|
| 40 |
st.session_state.bridging_text = file.read()
|
| 41 |
-
with open('
|
| 42 |
st.session_state.personalization_text = file.read()
|
| 43 |
-
with open('
|
| 44 |
st.session_state.both_text = file.read()
|
| 45 |
|
| 46 |
# web app state
|
|
@@ -69,7 +69,9 @@ if 'inserted' not in st.session_state:
|
|
| 69 |
st.session_state.convo_start_time = ''
|
| 70 |
|
| 71 |
if 'p' not in st.query_params:
|
| 72 |
-
st.query_params['p'] =
|
|
|
|
|
|
|
| 73 |
if 'id' not in st.query_params:
|
| 74 |
st.query_params['id'] = st.session_state.random_pid
|
| 75 |
if 'party' not in st.query_params:
|
|
|
|
| 6 |
import random
|
| 7 |
|
| 8 |
st.set_page_config(
|
| 9 |
+
page_title="Bot",
|
| 10 |
page_icon="🤖",
|
| 11 |
initial_sidebar_state="expanded",
|
| 12 |
layout="wide"
|
|
|
|
| 34 |
return text
|
| 35 |
|
| 36 |
if 'inserted' not in st.session_state:
|
| 37 |
+
with open('base.txt', 'r') as file:
|
| 38 |
st.session_state.base_text = file.read()
|
| 39 |
+
with open('bridging.txt', 'r') as file:
|
| 40 |
st.session_state.bridging_text = file.read()
|
| 41 |
+
with open('personalization.txt', 'r') as file:
|
| 42 |
st.session_state.personalization_text = file.read()
|
| 43 |
+
with open('both.txt', 'r') as file:
|
| 44 |
st.session_state.both_text = file.read()
|
| 45 |
|
| 46 |
# web app state
|
|
|
|
| 69 |
st.session_state.convo_start_time = ''
|
| 70 |
|
| 71 |
if 'p' not in st.query_params:
|
| 72 |
+
st.query_params['p'] = st.radio("Select a condition for the conversation",
|
| 73 |
+
['1', '2', '3', '4'],
|
| 74 |
+
help="1 = base, 2 = bridging, 3 = personalization, 4 = bridging + personalization")
|
| 75 |
if 'id' not in st.query_params:
|
| 76 |
st.query_params['id'] = st.session_state.random_pid
|
| 77 |
if 'party' not in st.query_params:
|