Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,8 @@ from deep_translator import GoogleTranslator
|
|
7 |
from langdetect import detect
|
8 |
from transformers import pipeline
|
9 |
|
|
|
|
|
10 |
|
11 |
# functions
|
12 |
def generate(prompt, max_tokens):
|
|
|
7 |
from langdetect import detect
|
8 |
from transformers import pipeline
|
9 |
|
10 |
+
# Загрузка модели для генерации текста
|
11 |
+
generator = pipeline("text-generation", model="gpt2")
|
12 |
|
13 |
# functions
|
14 |
def generate(prompt, max_tokens):
|