ikmalsaid commited on
Commit
98d93a2
1 Parent(s): d1890cb

added/updated app files

Browse files
modules/engine_describe.py CHANGED
@@ -12,7 +12,7 @@ def describe(input_describe, progress=ui.Progress()):
12
  payload = {'model_version': (None, '1')}; data = [('image',('_describe.jpg', image_bytes.getvalue(), 'image/jpeg'))]
13
 
14
  try:
15
- progress(0.95, desc="Describing image...")
16
  response = requests.post(mode['describe'], headers=head, data=payload, files=data, timeout=30)
17
  result = response.text.split(',', 1)
18
  described = result[0]
@@ -37,7 +37,7 @@ def describe_png(input_describe, progress=ui.Progress()):
37
  payload = {'model_version': (None, '1')}; data = [('image',('_describe.png', image_bytes.getvalue(), 'image/png'))]
38
 
39
  try:
40
- progress(0.95, desc="Describing image...")
41
  response = requests.post(mode['describe'], headers=head, data=payload, files=data, timeout=30)
42
  result = response.text.split(',', 1)
43
  described = result[0]
 
12
  payload = {'model_version': (None, '1')}; data = [('image',('_describe.jpg', image_bytes.getvalue(), 'image/jpeg'))]
13
 
14
  try:
15
+ progress(0.95, desc="Describing image")
16
  response = requests.post(mode['describe'], headers=head, data=payload, files=data, timeout=30)
17
  result = response.text.split(',', 1)
18
  described = result[0]
 
37
  payload = {'model_version': (None, '1')}; data = [('image',('_describe.png', image_bytes.getvalue(), 'image/png'))]
38
 
39
  try:
40
+ progress(0.95, desc="Describing image")
41
  response = requests.post(mode['describe'], headers=head, data=payload, files=data, timeout=30)
42
  result = response.text.split(',', 1)
43
  described = result[0]
modules/engine_upscale_alt.py CHANGED
@@ -12,7 +12,7 @@ def upscale(upscale_input, progress=ui.Progress()):
12
  payload = {'model_version': (None, '1')}; data = [('image',('upscale_input.jpg', image_bytes.getvalue(), 'image/jpeg'))]
13
 
14
  try:
15
- progress(0.95, desc="Upscaling image...")
16
  response = requests.post(mode['upscale'], headers=head, data=payload, files=data, timeout=(60, 60))
17
 
18
  if len(response.content) < 65 * 1024:
 
12
  payload = {'model_version': (None, '1')}; data = [('image',('upscale_input.jpg', image_bytes.getvalue(), 'image/jpeg'))]
13
 
14
  try:
15
+ progress(0.95, desc="Upscaling image")
16
  response = requests.post(mode['upscale'], headers=head, data=payload, files=data, timeout=(60, 60))
17
 
18
  if len(response.content) < 65 * 1024: