Spaces:
Sleeping
Sleeping
Commit
·
bf5b098
1
Parent(s):
6cae882
test without model
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ from transformers import pipeline
|
|
| 7 |
|
| 8 |
# Model and pipeline
|
| 9 |
MODEL_PATH = 'danielcd99/multilanguage-toxicity-classifier'
|
| 10 |
-
|
| 11 |
def load_pipeline():
|
| 12 |
pipe=pipeline(
|
| 13 |
"text-classification",
|
|
@@ -16,7 +16,7 @@ def load_pipeline():
|
|
| 16 |
return pipe
|
| 17 |
|
| 18 |
pipe = load_pipeline()
|
| 19 |
-
|
| 20 |
|
| 21 |
# Title and subtitle
|
| 22 |
st.title("Toxicity Detection")
|
|
@@ -42,4 +42,4 @@ if submit_button:
|
|
| 42 |
tweets = get_tweets(scraper, number_of_tweets)
|
| 43 |
predictions = get_predictions(tweets, pipe)
|
| 44 |
|
| 45 |
-
st.table(pd.DataFrame({'tweet': tweets, 'toxic':predictions}))
|
|
|
|
| 7 |
|
| 8 |
# Model and pipeline
|
| 9 |
MODEL_PATH = 'danielcd99/multilanguage-toxicity-classifier'
|
| 10 |
+
"""
|
| 11 |
def load_pipeline():
|
| 12 |
pipe=pipeline(
|
| 13 |
"text-classification",
|
|
|
|
| 16 |
return pipe
|
| 17 |
|
| 18 |
pipe = load_pipeline()
|
| 19 |
+
"""
|
| 20 |
|
| 21 |
# Title and subtitle
|
| 22 |
st.title("Toxicity Detection")
|
|
|
|
| 42 |
tweets = get_tweets(scraper, number_of_tweets)
|
| 43 |
predictions = get_predictions(tweets, pipe)
|
| 44 |
|
| 45 |
+
#st.table(pd.DataFrame({'tweet': tweets, 'toxic':predictions}))
|