Spaces:
Sleeping
Sleeping
Commit
·
bff0b27
1
Parent(s):
7901daa
Update app.py
Browse files
app.py
CHANGED
@@ -88,14 +88,16 @@ def page_reviews_classification():
|
|
88 |
st.write(f"Прогнозируемый класс: {prediction[0]}")
|
89 |
st.write(f"Время вычисления: {elapsed_time:.2f} сек.")
|
90 |
|
91 |
-
|
|
|
92 |
start_time = time.time()
|
93 |
prediction_rnn = predict_text(user_input_rnn)
|
94 |
elapsed_time = time.time() - start_time
|
95 |
st.write(f"Прогнозируемый класс с RNN: {prediction_rnn}")
|
96 |
st.write(f"Время вычисления: {elapsed_time:.2f} сек.")
|
97 |
|
98 |
-
|
|
|
99 |
start_time = time.time()
|
100 |
encoding = tokenizer.encode_plus(
|
101 |
user_input_bert,
|
|
|
88 |
st.write(f"Прогнозируемый класс: {prediction[0]}")
|
89 |
st.write(f"Время вычисления: {elapsed_time:.2f} сек.")
|
90 |
|
91 |
+
user_input = st.text_area("Введите текст отзыва для RNN модели:")
|
92 |
+
if st.button("Классифицировать с RNN"):
|
93 |
start_time = time.time()
|
94 |
prediction_rnn = predict_text(user_input_rnn)
|
95 |
elapsed_time = time.time() - start_time
|
96 |
st.write(f"Прогнозируемый класс с RNN: {prediction_rnn}")
|
97 |
st.write(f"Время вычисления: {elapsed_time:.2f} сек.")
|
98 |
|
99 |
+
user_input = st.text_area("Введите текст отзыва для BERT:")
|
100 |
+
if st.button("Классифицировать (BERT)"):
|
101 |
start_time = time.time()
|
102 |
encoding = tokenizer.encode_plus(
|
103 |
user_input_bert,
|