Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,30 +3,6 @@ import gradio as gr
|
|
3 |
from PIL import Image
|
4 |
import numpy as np
|
5 |
import os
|
6 |
-
from face_cropper import detect_and_label_faces
|
7 |
-
# Define a custom function to convert an image to grayscale
|
8 |
-
def to_grayscale(input_image):
|
9 |
-
grayscale_image = Image.fromarray(np.array(input_image).mean(axis=-1).astype(np.uint8))
|
10 |
-
return grayscale_image
|
11 |
-
|
12 |
-
|
13 |
-
description_markdown = """
|
14 |
-
# Fake Face Detection tool from TrustWorthy BiometraVision Lab IISER Bhopal
|
15 |
-
## Usage
|
16 |
-
This tool expects a face image as input. Upon submission, it will process the image and provide an output with bounding boxes drawn on the face. Alongside the visual markers, the tool will give a detection result indicating whether the face is fake or real.
|
17 |
-
## Disclaimer
|
18 |
-
Please note that this tool is for research purposes only and may not always be 100% accurate. Users are advised to exercise discretion and supervise the tool's usage accordingly.
|
19 |
-
## Licensing and Permissions
|
20 |
-
This tool has been developed solely for research and demonstrative purposes. Any commercial utilization of this tool is strictly prohibited unless explicit permission has been obtained from the developers.
|
21 |
-
## Developer Contact
|
22 |
-
For further inquiries or permissions, you can reach out to the developer through the following social media accounts:
|
23 |
-
- [LAB Webpage](https://sites.google.com/iiitd.ac.in/agarwalakshay/labiiserb?authuser=0)
|
24 |
-
- [LinkedIn](https://www.linkedin.com/in/shivam-shukla-0a50ab1a2/)
|
25 |
-
- [GitHub](https://github.com/SaShukla090)
|
26 |
-
"""
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
|
31 |
# Create the Gradio app
|
32 |
app = gr.Interface(
|
|
|
3 |
from PIL import Image
|
4 |
import numpy as np
|
5 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
# Create the Gradio app
|
8 |
app = gr.Interface(
|