Spaces:
Running
Running
Delete gradio_app.py
Browse files- gradio_app.py +0 -26
gradio_app.py
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
-
from gradio_app.inference import run_inference
|
| 3 |
-
|
| 4 |
-
def create_gradio_interface():
|
| 5 |
-
return gr.Interface(
|
| 6 |
-
fn=run_inference,
|
| 7 |
-
inputs=[
|
| 8 |
-
gr.Image(type="pil", label="Upload Image"),
|
| 9 |
-
gr.File(label="Reference Dict JSON File"),
|
| 10 |
-
gr.File(label="Index to Class Mapping JSON File"),
|
| 11 |
-
gr.File(label="Classifier Model (.pth) File"),
|
| 12 |
-
gr.Textbox(label="EdgeFace Model Name", value="edgeface_base"),
|
| 13 |
-
gr.Textbox(label="EdgeFace Model Directory", value="ckpts/idiap"),
|
| 14 |
-
gr.Dropdown(choices=["yolo", "mtcnn"], label="Face Detection Algorithm", value="yolo"),
|
| 15 |
-
gr.Dropdown(choices=["auto", "cpu", "gpu"], label="Accelerator", value="auto"),
|
| 16 |
-
gr.Slider(minimum=112, maximum=448, step=1, value=224, label="Resolution"),
|
| 17 |
-
gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.6, label="Similarity Threshold")
|
| 18 |
-
],
|
| 19 |
-
outputs="text",
|
| 20 |
-
title="Face Classification with EdgeFace Validation",
|
| 21 |
-
description="Upload an image and required files to perform face classification with EdgeFace embedding validation."
|
| 22 |
-
)
|
| 23 |
-
|
| 24 |
-
if __name__ == "__main__":
|
| 25 |
-
iface = create_gradio_interface()
|
| 26 |
-
iface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|