Spaces:
Runtime error
Runtime error
cointegrated
commited on
Commit
•
c6948e2
1
Parent(s):
e216ec5
add torch as dependency
Browse files- .gitignore +0 -0
- .idea/.gitignore +2 -0
- app.py +1 -1
- requirements.txt +1 -0
.gitignore
ADDED
File without changes
|
.idea/.gitignore
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
.idea
|
2 |
+
|
app.py
CHANGED
@@ -22,7 +22,7 @@ def text2toxicity(text, aggregate=True):
|
|
22 |
return proba
|
23 |
|
24 |
|
25 |
-
text = st.text_area('Введите текст')
|
26 |
proba = text2toxicity(text, aggregate=False)
|
27 |
s = pd.Series(
|
28 |
proba.tolist() + [proba[0] * (1 - proba[-1])],
|
|
|
22 |
return proba
|
23 |
|
24 |
|
25 |
+
text = st.text_area('Введите текст', value='Пороть надо таких придурков!')
|
26 |
proba = text2toxicity(text, aggregate=False)
|
27 |
s = pd.Series(
|
28 |
proba.tolist() + [proba[0] * (1 - proba[-1])],
|
requirements.txt
CHANGED
@@ -2,3 +2,4 @@ transformers
|
|
2 |
sentencepiece
|
3 |
pandas
|
4 |
streamlit
|
|
|
|
2 |
sentencepiece
|
3 |
pandas
|
4 |
streamlit
|
5 |
+
torch
|