Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import streamlit as st
|
|
3 |
import pandas as pd
|
4 |
import numpy as np
|
5 |
import plotly.express as px
|
|
|
6 |
from sklearn.metrics.pairwise import paired_cosine_distances
|
7 |
from sklearn.preprocessing import normalize
|
8 |
from rolaser import RoLaserEncoder
|
@@ -109,6 +110,22 @@ def main():
|
|
109 |
st.header('Cosine Distance Statistics')
|
110 |
st.caption('*This box plot is interactive: Hover on the boxes to display values. Click on the legend items to filter models.*')
|
111 |
fig = px.box(outputs, x='model', y='cos', color='model', boxmean='sd')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
fig.update_xaxes(title_text='Model')
|
113 |
fig.update_yaxes(title_text='Cosine Distance')
|
114 |
st.plotly_chart(fig, use_container_width=True)
|
|
|
3 |
import pandas as pd
|
4 |
import numpy as np
|
5 |
import plotly.express as px
|
6 |
+
import plotly.graph_objects as go
|
7 |
from sklearn.metrics.pairwise import paired_cosine_distances
|
8 |
from sklearn.preprocessing import normalize
|
9 |
from rolaser import RoLaserEncoder
|
|
|
110 |
st.header('Cosine Distance Statistics')
|
111 |
st.caption('*This box plot is interactive: Hover on the boxes to display values. Click on the legend items to filter models.*')
|
112 |
fig = px.box(outputs, x='model', y='cos', color='model', boxmean='sd')
|
113 |
+
fig = go.Figure()
|
114 |
+
fig.add_trace(go.Box(
|
115 |
+
y=outputs[outputs['model']=='LASER']['cos'],
|
116 |
+
name='LASER',
|
117 |
+
boxmean='sd'
|
118 |
+
))
|
119 |
+
fig.add_trace(go.Box(
|
120 |
+
y=outputs[outputs['model']=='RoLASER']['cos'],
|
121 |
+
name='RoLASER',
|
122 |
+
boxmean='sd'
|
123 |
+
))
|
124 |
+
fig.add_trace(go.Box(
|
125 |
+
y=outputs[outputs['model']=='c-RoLASER']['cos'],
|
126 |
+
name='c-RoLASER',
|
127 |
+
boxmean='sd'
|
128 |
+
))
|
129 |
fig.update_xaxes(title_text='Model')
|
130 |
fig.update_yaxes(title_text='Cosine Distance')
|
131 |
st.plotly_chart(fig, use_container_width=True)
|