lalashechka commited on
Commit
352c70d
1 Parent(s): 962fd7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -14,13 +14,13 @@ import base64
14
 
15
  def flip_text(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed):
16
  result = {"prompt": prompt,"negative_prompt": negative_prompt,"task": task,"steps": steps,"sampler": sampler,"cfg_scale": cfg_scale,"seed": seed}
17
- print(result)
18
 
19
  language = detect(prompt)
20
 
21
  if language == 'ru':
22
  prompt = GoogleTranslator(source='ru', target='en').translate(prompt)
23
- print(prompt)
24
 
25
  cfg = int(cfg_scale)
26
  steps = int(steps)
@@ -86,9 +86,9 @@ def mirror(image_output, scale_by, method, gfpgan, codeformer):
86
 
87
  encoded_string2 = "data:image/png;base64," + encoded_string2
88
  data = {"fn_index":81,"data":[0,0,encoded_string2,None,"","",True,gfpgan,codeformer,0,scale_by,512,512,None,method,"None",1,False,[],"",""],"session_hash":""}
89
- print(data)
90
  r = requests.post(f"{url_up}", json=data, timeout=100)
91
- print(r.text)
92
  ph = f"{url_up_f}" + str(r.json()['data'][0][0]['name'])
93
  return ph
94
 
 
14
 
15
  def flip_text(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed):
16
  result = {"prompt": prompt,"negative_prompt": negative_prompt,"task": task,"steps": steps,"sampler": sampler,"cfg_scale": cfg_scale,"seed": seed}
17
+ # print(result)
18
 
19
  language = detect(prompt)
20
 
21
  if language == 'ru':
22
  prompt = GoogleTranslator(source='ru', target='en').translate(prompt)
23
+ # print(prompt)
24
 
25
  cfg = int(cfg_scale)
26
  steps = int(steps)
 
86
 
87
  encoded_string2 = "data:image/png;base64," + encoded_string2
88
  data = {"fn_index":81,"data":[0,0,encoded_string2,None,"","",True,gfpgan,codeformer,0,scale_by,512,512,None,method,"None",1,False,[],"",""],"session_hash":""}
89
+ # print(data)
90
  r = requests.post(f"{url_up}", json=data, timeout=100)
91
+ # print(r.text)
92
  ph = f"{url_up_f}" + str(r.json()['data'][0][0]['name'])
93
  return ph
94