Spaces:
Running
Running
minor
Browse files
app.py
CHANGED
@@ -15,7 +15,6 @@ person_list_path = [os.path.join(example_path, "person", person) for person in p
|
|
15 |
|
16 |
|
17 |
def call_tryon_api(person_file, garm_file, category, model_type='SD_V1'):
|
18 |
-
print(person_file, garm_file, category)
|
19 |
tryon_url = os.environ['API_ENDPOINT'] + "/tryon/v1"
|
20 |
payload = {'garment_type': category, 'model_type': model_type}
|
21 |
files = {
|
@@ -129,7 +128,7 @@ with gr.Blocks() as Huhu_Turbo:
|
|
129 |
with gr.Column(elem_id = "col-result"):
|
130 |
result_img = gr.Image(label="Result", show_share_button=False)
|
131 |
with gr.Row():
|
132 |
-
result_info = gr.Text(label="
|
133 |
generate_button = gr.Button(value="RUN", elem_id="button")
|
134 |
|
135 |
generate_button.click(fn=run_turbo, inputs=[person_img, garm_img, category], outputs=[result_img, result_info], api_name=False, concurrency_limit=30)
|
@@ -146,7 +145,7 @@ with gr.Blocks() as Huhu_Turbo:
|
|
146 |
""")
|
147 |
show_case = gr.Examples(
|
148 |
examples=[
|
149 |
-
["data/examples/
|
150 |
],
|
151 |
inputs=[person_img, garm_img, category, result_img],
|
152 |
label=None
|
|
|
15 |
|
16 |
|
17 |
def call_tryon_api(person_file, garm_file, category, model_type='SD_V1'):
|
|
|
18 |
tryon_url = os.environ['API_ENDPOINT'] + "/tryon/v1"
|
19 |
payload = {'garment_type': category, 'model_type': model_type}
|
20 |
files = {
|
|
|
128 |
with gr.Column(elem_id = "col-result"):
|
129 |
result_img = gr.Image(label="Result", show_share_button=False)
|
130 |
with gr.Row():
|
131 |
+
result_info = gr.Text(label="Tryon inference runtime")
|
132 |
generate_button = gr.Button(value="RUN", elem_id="button")
|
133 |
|
134 |
generate_button.click(fn=run_turbo, inputs=[person_img, garm_img, category], outputs=[result_img, result_info], api_name=False, concurrency_limit=30)
|
|
|
145 |
""")
|
146 |
show_case = gr.Examples(
|
147 |
examples=[
|
148 |
+
["data/examples/person_example.png", "data/examples/garment_example.png", "Top", "data/examples/result_example.png"],
|
149 |
],
|
150 |
inputs=[person_img, garm_img, category, result_img],
|
151 |
label=None
|