Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# This is a simple Gradio app that embeds an iframe to display an external Hugging Face Space.
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
# Define the CSS to embed the iframe
|
5 |
+
css = """
|
6 |
+
.iframe-container {
|
7 |
+
position: relative;
|
8 |
+
width: 100%;
|
9 |
+
height: 0;
|
10 |
+
padding-bottom: 53.33%; /* 450 / 850 * 100 */
|
11 |
+
}
|
12 |
+
.iframe-container iframe {
|
13 |
+
position: absolute;
|
14 |
+
top: 0;
|
15 |
+
left: 0;
|
16 |
+
width: 100%;
|
17 |
+
height: 100%;
|
18 |
+
border: none;
|
19 |
+
}
|
20 |
+
"""
|
21 |
+
|
22 |
+
# Create a Gradio Blocks app
|
23 |
+
with gr.Blocks(css=css) as demo:
|
24 |
+
# Add a Markdown component to provide some context
|
25 |
+
gr.Markdown("## Centurion AI DeepFake Detector")
|
26 |
+
# Add a HTML component to embed the iframe
|
27 |
+
gr.HTML('<div class="iframe-container"><iframe src="https://noumanjavaid-centii.hf.space"></iframe></div>')
|
28 |
+
|
29 |
+
# Launch the app
|
30 |
+
demo.launch(show_error=True)
|