israelweiss commited on
Commit
9ade37d
·
1 Parent(s): 2d8c11a

prod endpoint, temp print of response

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -24,8 +24,7 @@ def download_image(url):
24
 
25
  def eraser_api_call(image_base64_file, mask_base64_file, seed, mask_type, original_quality, guidance_scale):
26
 
27
- # url = "http://engine.prod.bria-api.com/v1/eraser" # TODO: use this link!
28
- url = "http://engine.int.bria-api.com/v1/eraser" # TODO: use this link!
29
 
30
  payload = {
31
  "file": image_base64_file,
@@ -37,6 +36,7 @@ def eraser_api_call(image_base64_file, mask_base64_file, seed, mask_type, origin
37
  }
38
  response = requests.post(url, json=payload, headers=auth_headers)
39
  response = response.json()
 
40
  res_image = download_image(response["result_url"])
41
 
42
  return res_image
@@ -177,6 +177,7 @@ with image_blocks as demo:
177
 
178
  # Button click will trigger the inpainting function (no prompt required)
179
  btn.click(fn=predict, inputs=[image, guidance_scale, seed], outputs=[image_out], api_name='run')
 
180
 
181
 
182
  gr.HTML(
 
24
 
25
  def eraser_api_call(image_base64_file, mask_base64_file, seed, mask_type, original_quality, guidance_scale):
26
 
27
+ url = "http://engine.prod.bria-api.com/v1/eraser"
 
28
 
29
  payload = {
30
  "file": image_base64_file,
 
36
  }
37
  response = requests.post(url, json=payload, headers=auth_headers)
38
  response = response.json()
39
+ print("response: ", response) # TODO: delete
40
  res_image = download_image(response["result_url"])
41
 
42
  return res_image
 
177
 
178
  # Button click will trigger the inpainting function (no prompt required)
179
  btn.click(fn=predict, inputs=[image, guidance_scale, seed], outputs=[image_out], api_name='run')
180
+ btn.submit
181
 
182
 
183
  gr.HTML(