Spaces:
Sleeping
Sleeping
Commit
·
06247a9
1
Parent(s):
c31032a
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ import time
|
|
10 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
11 |
from transformers import GPT2Tokenizer, GPT2LMHeadModel
|
12 |
|
13 |
-
tok = GPT2Tokenizer()
|
14 |
model_checkpoint = 'cointegrated/rubert-tiny-toxicity'
|
15 |
toxicity_tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
16 |
toxicity_model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint)
|
@@ -145,6 +145,8 @@ def main():
|
|
145 |
page_reviews_classification()
|
146 |
elif page_selection == "Анализ токсичности":
|
147 |
page_toxicity_analysis()
|
|
|
|
|
148 |
|
149 |
if __name__ == "__main__":
|
150 |
main()
|
|
|
10 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
11 |
from transformers import GPT2Tokenizer, GPT2LMHeadModel
|
12 |
|
13 |
+
tok = GPT2Tokenizer.from_pretrained('sberbank-ai/rugpt3small_based_on_gpt2')
|
14 |
model_checkpoint = 'cointegrated/rubert-tiny-toxicity'
|
15 |
toxicity_tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
16 |
toxicity_model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint)
|
|
|
145 |
page_reviews_classification()
|
146 |
elif page_selection == "Анализ токсичности":
|
147 |
page_toxicity_analysis()
|
148 |
+
elif page_selection == "Генерация текста Noize MC":
|
149 |
+
page_gpt_generation()
|
150 |
|
151 |
if __name__ == "__main__":
|
152 |
main()
|