Spaces:
Running
Running
Commit
·
a08eb0d
1
Parent(s):
c2c9be0
title, prod endpoint
Browse files
app.py
CHANGED
|
@@ -25,8 +25,7 @@ def download_image(url):
|
|
| 25 |
|
| 26 |
def lifestyle_shot_by_text_api_call(image_base64_file, prompt):
|
| 27 |
|
| 28 |
-
|
| 29 |
-
url = "http://engine.int.bria-api.com/v1/product/lifestyle_shot_by_text" # TODO: use line above!
|
| 30 |
|
| 31 |
payload = {
|
| 32 |
"file": image_base64_file,
|
|
@@ -57,8 +56,7 @@ def predict_ref_by_text(input_image, prompt):
|
|
| 57 |
|
| 58 |
def lifestyle_shot_by_image_api_call(image_base64_file, ref_image_base64_file):
|
| 59 |
|
| 60 |
-
|
| 61 |
-
url = "http://engine.int.bria-api.com/v1/product/lifestyle_shot_by_image" # TODO: use line above!
|
| 62 |
|
| 63 |
payload = {
|
| 64 |
"file": image_base64_file,
|
|
@@ -137,7 +135,7 @@ div#share-btn-container > div {flex-direction: row;background: black;align-items
|
|
| 137 |
image_blocks = gr.Blocks(css=css, elem_id="total-container")
|
| 138 |
with image_blocks as demo:
|
| 139 |
# with gr.Column(elem_id="col-container"):
|
| 140 |
-
gr.Markdown("##
|
| 141 |
gr.HTML('''
|
| 142 |
<p style="margin-bottom: 10px; font-size: 94%">
|
| 143 |
This demo showcases the <strong>Lifestyle Product Shot by Text</strong> and <strong>Lifestyle Product Shot by Image</strong> feature, enabling users to generate product backgrounds effortlessly.<br>
|
|
|
|
| 25 |
|
| 26 |
def lifestyle_shot_by_text_api_call(image_base64_file, prompt):
|
| 27 |
|
| 28 |
+
url = "http://engine.prod.bria-api.com/v1/product/lifestyle_shot_by_text"
|
|
|
|
| 29 |
|
| 30 |
payload = {
|
| 31 |
"file": image_base64_file,
|
|
|
|
| 56 |
|
| 57 |
def lifestyle_shot_by_image_api_call(image_base64_file, ref_image_base64_file):
|
| 58 |
|
| 59 |
+
url = "http://engine.prod.bria-api.com/v1/product/lifestyle_shot_by_image"
|
|
|
|
| 60 |
|
| 61 |
payload = {
|
| 62 |
"file": image_base64_file,
|
|
|
|
| 135 |
image_blocks = gr.Blocks(css=css, elem_id="total-container")
|
| 136 |
with image_blocks as demo:
|
| 137 |
# with gr.Column(elem_id="col-container"):
|
| 138 |
+
gr.Markdown("## Product Shot Generation")
|
| 139 |
gr.HTML('''
|
| 140 |
<p style="margin-bottom: 10px; font-size: 94%">
|
| 141 |
This demo showcases the <strong>Lifestyle Product Shot by Text</strong> and <strong>Lifestyle Product Shot by Image</strong> feature, enabling users to generate product backgrounds effortlessly.<br>
|