Rooni commited on
Commit
905dc49
·
1 Parent(s): ddaba32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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):