Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -294,4 +294,49 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
|
|
294 |
)
|
295 |
|
296 |
if __name__ == "__main__":
|
297 |
-
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
)
|
295 |
|
296 |
if __name__ == "__main__":
|
297 |
+
demo.launch()
|
298 |
+
|
299 |
+
# ... (keep all the previous imports and model loading code)
|
300 |
+
|
301 |
+
with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
|
302 |
+
with gr.Column(elem_id="main-container"):
|
303 |
+
# Enhanced Header Section
|
304 |
+
with gr.Column(elem_classes=["header"]):
|
305 |
+
gr.Markdown("""
|
306 |
+
<div style="text-align: center;">
|
307 |
+
<h1 style="font-size: 2.5em; margin-bottom: 0.2em;
|
308 |
+
background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
|
309 |
+
-webkit-background-clip: text;
|
310 |
+
-webkit-text-fill-color: transparent;
|
311 |
+
display: inline-block;">
|
312 |
+
🛡️ DeepGuard AI
|
313 |
+
</h1>
|
314 |
+
<p style="font-size: 1.1em; color: #555; margin-top: 0;">
|
315 |
+
Advanced Deepfake & AI-Generated Content Detection System
|
316 |
+
</p>
|
317 |
+
</div>
|
318 |
+
""")
|
319 |
+
|
320 |
+
# ... (rest of the interface code remains the same)
|
321 |
+
|
322 |
+
with gr.Row():
|
323 |
+
with gr.Column(scale=1.5):
|
324 |
+
image_input = gr.Image(
|
325 |
+
type="pil",
|
326 |
+
label="Upload Image for Analysis",
|
327 |
+
elem_classes=["upload-area", "animation"]
|
328 |
+
)
|
329 |
+
|
330 |
+
with gr.Row():
|
331 |
+
model_selector = gr.Dropdown(
|
332 |
+
choices=list(MODEL_NAMES.keys()),
|
333 |
+
value=list(MODEL_NAMES.keys())[0],
|
334 |
+
label="Select Detection Model",
|
335 |
+
elem_classes=["model-select", "animation"]
|
336 |
+
)
|
337 |
+
analyze_btn = gr.Button(
|
338 |
+
"Analyze Image",
|
339 |
+
elem_classes=["btn-primary", "animation"]
|
340 |
+
)
|
341 |
+
|
342 |
+
# ... (rest of the interface code remains the same)
|