PIERRE CUGNET
commited on
Commit
•
81faf73
1
Parent(s):
57410b1
feat(py): add a button to prevent automatic inference
Browse files
app.py
CHANGED
@@ -85,8 +85,6 @@ model = tf.keras.Model(inputs=bert_inputs, outputs=y)
|
|
85 |
|
86 |
model.load_weights('sentiment_weights.h5')
|
87 |
|
88 |
-
st.button('Predict sentiment')
|
89 |
-
|
90 |
if st.button('Predict sentiment'):
|
91 |
prediction = model.predict({'input_ids': encoded_input['input_ids'], 'input_mask': encoded_input['attention_mask']})
|
92 |
encoded_dict = {0: 'negative', 1: 'positive'}
|
|
|
85 |
|
86 |
model.load_weights('sentiment_weights.h5')
|
87 |
|
|
|
|
|
88 |
if st.button('Predict sentiment'):
|
89 |
prediction = model.predict({'input_ids': encoded_input['input_ids'], 'input_mask': encoded_input['attention_mask']})
|
90 |
encoded_dict = {0: 'negative', 1: 'positive'}
|