Delete api.py
Browse files
api.py
DELETED
|
@@ -1,20 +0,0 @@
|
|
| 1 |
-
|
| 2 |
-
import gradio as gr
|
| 3 |
-
from run import swap_function # Stelle sicher, dass swap_function aus deiner run.py importierbar ist
|
| 4 |
-
|
| 5 |
-
iface = gr.Interface(
|
| 6 |
-
fn=swap_function,
|
| 7 |
-
inputs=[
|
| 8 |
-
gr.Image(label="Input Image"),
|
| 9 |
-
gr.Image(label="Face Source Image"),
|
| 10 |
-
gr.Slider(minimum=0.3, maximum=1.0, step=0.05, value=0.6, label="Face Distance"),
|
| 11 |
-
gr.Slider(minimum=0.0, maximum=1.0, step=0.05, value=0.65, label="Blend Ratio"),
|
| 12 |
-
gr.Dropdown(choices=["GFPGAN", "RestoreFormer", "CodeFormer", "None"], value="GFPGAN", label="Enhancer")
|
| 13 |
-
],
|
| 14 |
-
outputs=gr.Image(label="Swapped Result"),
|
| 15 |
-
title="Roop API Interface",
|
| 16 |
-
description="Programmatische Nutzung von Roop über eine standardisierte API-Schnittstelle."
|
| 17 |
-
)
|
| 18 |
-
|
| 19 |
-
if __name__ == "__main__":
|
| 20 |
-
iface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|