Palplatine commited on
Commit
faca89f
1 Parent(s): e0a7610

Removing columns for gauge

Browse files
Files changed (1) hide show
  1. app.py +13 -17
app.py CHANGED
@@ -195,23 +195,19 @@ with st.expander('Input a sentence and check the probability of it being hateful
195
  percentage = y_pred[0][0] * 100
196
 
197
  # Scoreboard du prêt
198
- col1, col2, col3, col4 = st.columns(4)
199
-
200
- with col2:
201
-
202
- fig1 = go.Figure(go.Indicator(
203
- mode = "gauge+number+delta",
204
- value = y_pred[0][0],
205
- delta = {'reference': 0.50},
206
- gauge = {'axis': {'range': [None, 1]},
207
- 'steps' : [
208
- {'range': [0, 0.5], 'color': "lightgray"},
209
- {'range': [0.5, 0.75], 'color': "gray"}],
210
- 'threshold' : {'line': {'color': "red", 'width': 4}, 'thickness': 0.9, 'value': 0.5}},
211
- domain = {'x': [0, 1], 'y': [0, 1]},
212
- title = {'text': 'Probability of your sentence being hateful'}))
213
-
214
- st.plotly_chart(fig1)
215
 
216
  if y_pred[0][0] < 0.5:
217
  st.write(f"Congrats, it's not hateful!!!")
 
195
  percentage = y_pred[0][0] * 100
196
 
197
  # Scoreboard du prêt
198
+ fig1 = go.Figure(go.Indicator(
199
+ mode = "gauge+number+delta",
200
+ value = y_pred[0][0],
201
+ delta = {'reference': 0.50},
202
+ gauge = {'axis': {'range': [None, 1]},
203
+ 'steps' : [
204
+ {'range': [0, 0.5], 'color': "lightgray"},
205
+ {'range': [0.5, 0.75], 'color': "gray"}],
206
+ 'threshold' : {'line': {'color': "red", 'width': 4}, 'thickness': 0.9, 'value': 0.5}},
207
+ domain = {'x': [0, 1], 'y': [0, 1]},
208
+ title = {'text': 'Probability of your sentence being hateful'}))
209
+
210
+ st.plotly_chart(fig1)
 
 
 
 
211
 
212
  if y_pred[0][0] < 0.5:
213
  st.write(f"Congrats, it's not hateful!!!")