hemil124 commited on
Commit
5bcd600
Β·
verified Β·
1 Parent(s): f41c761

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -71,7 +71,7 @@ def get_pipeline():
71
 
72
  # ─────────────────────────── INFERENCE ───────────────────────── #
73
 
74
- @spaces.GPU
75
  def try_on(
76
  person_image,
77
  garment_image,
@@ -177,7 +177,8 @@ TIPS_HTML = """
177
  person_example = os.path.join(EXAMPLES_DIR, "model.jpeg")
178
  garment_example = os.path.join(EXAMPLES_DIR, "garment.jpeg")
179
 
180
- with gr.Blocks(css=CUSTOM_CSS, title="FASHN VTON β€” Virtual Try-On") as demo:
 
181
 
182
  gr.Markdown(BANNER_MD)
183
  gr.HTML(TIPS_HTML)
@@ -277,4 +278,9 @@ with gr.Blocks(css=CUSTOM_CSS, title="FASHN VTON β€” Virtual Try-On") as demo:
277
  demo.queue(default_concurrency_limit=1, max_size=10)
278
 
279
  if __name__ == "__main__":
280
- demo.launch(server_name="0.0.0.0", share=False)
 
 
 
 
 
 
71
 
72
  # ─────────────────────────── INFERENCE ───────────────────────── #
73
 
74
+ @spaces.GPU(duration=120)
75
  def try_on(
76
  person_image,
77
  garment_image,
 
177
  person_example = os.path.join(EXAMPLES_DIR, "model.jpeg")
178
  garment_example = os.path.join(EXAMPLES_DIR, "garment.jpeg")
179
 
180
+ # with gr.Blocks(css=CUSTOM_CSS, title="FASHN VTON β€” Virtual Try-On") as demo:
181
+ with gr.Blocks(title="FASHN VTON β€” Virtual Try-On") as demo:
182
 
183
  gr.Markdown(BANNER_MD)
184
  gr.HTML(TIPS_HTML)
 
278
  demo.queue(default_concurrency_limit=1, max_size=10)
279
 
280
  if __name__ == "__main__":
281
+ # demo.launch(server_name="0.0.0.0", share=False)
282
+ demo.launch(
283
+ server_name="0.0.0.0",
284
+ share=False,
285
+ css=CUSTOM_CSS,
286
+ )