aproxtimedev commited on
Commit
3bb7272
·
1 Parent(s): d2b8be8

add : route

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -162,7 +162,7 @@ load_face_swapper_model()
162
 
163
  ## ------------------------------ MAIN PROCESS ------------------------------
164
 
165
-
166
  def process(
167
  video_path,
168
  source_path,
@@ -510,13 +510,10 @@ css = """
510
  footer{display:none !important}
511
  """
512
 
513
- add_endpoint = gr.routes.NamedEndpoint(fn=process, inputs=[gr.Image(), gr.Video(), gr.Text(), gr.Text()], outputs=[gr.Text()], name="add")
514
-
515
  with gr.Blocks(css=css) as interface:
516
  gr.Markdown("# 🗿 API Swap Face")
517
  gr.Markdown("### Face swap app based on insightface inswapper.")
518
- gr.load(add_endpoint)
519
-
520
  with gr.Row():
521
  with gr.Row():
522
  with gr.Column(scale=0.4):
 
162
 
163
  ## ------------------------------ MAIN PROCESS ------------------------------
164
 
165
+ @gr.route("/process")
166
  def process(
167
  video_path,
168
  source_path,
 
510
  footer{display:none !important}
511
  """
512
 
 
 
513
  with gr.Blocks(css=css) as interface:
514
  gr.Markdown("# 🗿 API Swap Face")
515
  gr.Markdown("### Face swap app based on insightface inswapper.")
516
+
 
517
  with gr.Row():
518
  with gr.Row():
519
  with gr.Column(scale=0.4):