Rooni commited on
Commit
9982bae
1 Parent(s): 14fec32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -15,10 +15,12 @@ models_list = ["AbsoluteReality 1.8.1", "DALL-E 3 XL", "Playground 2", "Openjour
15
 
16
  def query(prompt, model, is_negative=False, steps=20, cfg_scale=7, seed=None):
17
  language = detect(prompt)
18
-
 
 
19
  if language == 'ru':
20
  prompt = GoogleTranslator(source='ru', target='en').translate(prompt)
21
- print(f'\033[1mГенерация:\033[0m {prompt}')
22
 
23
  if model == 'DALL-E 3 XL':
24
  API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
 
15
 
16
  def query(prompt, model, is_negative=False, steps=20, cfg_scale=7, seed=None):
17
  language = detect(prompt)
18
+ key = random.randint(0, 999)
19
+
20
+ print(f'\033[1mГенерация {key}:\033[0m {prompt}')
21
  if language == 'ru':
22
  prompt = GoogleTranslator(source='ru', target='en').translate(prompt)
23
+ print(f'\033[1mГенерация {key} перевод:\033[0m {prompt}')
24
 
25
  if model == 'DALL-E 3 XL':
26
  API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"