Spaces:
Sleeping
Sleeping
Commit
·
022adff
1
Parent(s):
f8088a8
Update app.py
Browse files
app.py
CHANGED
@@ -54,8 +54,8 @@ def predict_text(text):
|
|
54 |
|
55 |
def page_reviews_classification():
|
56 |
st.title("Модель классификации отзывов")
|
57 |
-
|
58 |
-
|
59 |
user_input = st.text_area("Введите текст отзыва:")
|
60 |
|
61 |
if st.button("Классифицировать"):
|
@@ -102,14 +102,11 @@ def page_reviews_classification():
|
|
102 |
st.write(f"Время вычисления: {elapsed_time:.2f} сек.")
|
103 |
|
104 |
def page_toxicity_analysis():
|
105 |
-
# Код для анализа токсичности текста с использованием модели cointegrated/rubert-tiny-toxicity
|
106 |
user_input_toxicity = st.text_area("Введите текст для оценки токсичности:")
|
107 |
-
|
108 |
if st.button("Оценить токсичность"):
|
109 |
start_time = time.time()
|
110 |
probs = text2toxicity(user_input_toxicity, aggregate=False)
|
111 |
elapsed_time = time.time() - start_time
|
112 |
-
|
113 |
for label, prob in probs.items():
|
114 |
st.write(f"Вероятность того что комментарий {label}: {prob:.4f}")
|
115 |
|
|
|
54 |
|
55 |
def page_reviews_classification():
|
56 |
st.title("Модель классификации отзывов")
|
57 |
+
st.image("ramsey.jpg", caption="finally some good food", use_column_width=True)
|
58 |
+
|
59 |
user_input = st.text_area("Введите текст отзыва:")
|
60 |
|
61 |
if st.button("Классифицировать"):
|
|
|
102 |
st.write(f"Время вычисления: {elapsed_time:.2f} сек.")
|
103 |
|
104 |
def page_toxicity_analysis():
|
|
|
105 |
user_input_toxicity = st.text_area("Введите текст для оценки токсичности:")
|
|
|
106 |
if st.button("Оценить токсичность"):
|
107 |
start_time = time.time()
|
108 |
probs = text2toxicity(user_input_toxicity, aggregate=False)
|
109 |
elapsed_time = time.time() - start_time
|
|
|
110 |
for label, prob in probs.items():
|
111 |
st.write(f"Вероятность того что комментарий {label}: {prob:.4f}")
|
112 |
|