Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -40,9 +40,9 @@ UGC_SENTENCES = [
|
|
40 |
def add_text_inputs(i):
|
41 |
col1, col2 = st.columns(2)
|
42 |
with col1:
|
43 |
-
text_input1 = st.text_input('Enter standard text here:', key=f'std{i}', value=STD_SENTENCES[i])
|
44 |
with col2:
|
45 |
-
text_input2 = st.text_input('Enter non-standard text here:', key=f'ugc{i}', value=UGC_SENTENCES[i])
|
46 |
return text_input1, text_input2
|
47 |
|
48 |
def main():
|
@@ -61,6 +61,12 @@ def main():
|
|
61 |
|
62 |
num_pairs = st.sidebar.number_input('Number of Text Input Pairs', min_value=1, max_value=10, value=5)
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
std_text_inputs = []
|
65 |
ugc_text_inputs = []
|
66 |
for i in range(num_pairs):
|
@@ -89,7 +95,7 @@ def main():
|
|
89 |
outputs['cos'] = np.concatenate([X_cos_laser, X_cos_rolaser, X_cos_c_rolaser])
|
90 |
|
91 |
st.header('Cosine Distance Scores:')
|
92 |
-
st.caption('*This bar plot is interactive: Hover on the bars to display values. Click on the legend to filter models.*')
|
93 |
fig = px.bar(outputs, x='pair', y='cos', color='model', barmode='group', hover_data=['ugc', 'std'])
|
94 |
fig.update_xaxes(title_text='Text Input Pair')
|
95 |
fig.update_yaxes(title_text='Cosine Distance')
|
|
|
40 |
def add_text_inputs(i):
|
41 |
col1, col2 = st.columns(2)
|
42 |
with col1:
|
43 |
+
text_input1 = st.text_input('Enter standard text here:', key=f'std{i}', value=STD_SENTENCES[i], label_visibility='collapsed')
|
44 |
with col2:
|
45 |
+
text_input2 = st.text_input('Enter non-standard text here:', key=f'ugc{i}', value=UGC_SENTENCES[i], label_visibility='collapsed')
|
46 |
return text_input1, text_input2
|
47 |
|
48 |
def main():
|
|
|
61 |
|
62 |
num_pairs = st.sidebar.number_input('Number of Text Input Pairs', min_value=1, max_value=10, value=5)
|
63 |
|
64 |
+
col1, col2 = st.columns(2)
|
65 |
+
with col1:
|
66 |
+
st.write('Enter standard text here:')
|
67 |
+
with col2:
|
68 |
+
st.write('Enter non-standard text here:')
|
69 |
+
|
70 |
std_text_inputs = []
|
71 |
ugc_text_inputs = []
|
72 |
for i in range(num_pairs):
|
|
|
95 |
outputs['cos'] = np.concatenate([X_cos_laser, X_cos_rolaser, X_cos_c_rolaser])
|
96 |
|
97 |
st.header('Cosine Distance Scores:')
|
98 |
+
st.caption('*This bar plot is interactive: Hover on the bars to display values. Click on the legend items to filter models.*')
|
99 |
fig = px.bar(outputs, x='pair', y='cos', color='model', barmode='group', hover_data=['ugc', 'std'])
|
100 |
fig.update_xaxes(title_text='Text Input Pair')
|
101 |
fig.update_yaxes(title_text='Cosine Distance')
|