Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -78,21 +78,27 @@ def format_results(results, media_type):
|
|
| 78 |
indicators = results.get('indicators', [])
|
| 79 |
|
| 80 |
# Build HTML output
|
| 81 |
-
html = f"""
|
| 82 |
-
|
| 83 |
-
|
| 84 |
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
|
|
|
| 90 |
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
<div style="{style} padding: 15px; margin: 10px 0;">
|
| 93 |
<h3>{'π΄ LIKELY DEEPFAKE/AI-GENERATED' if is_fake else 'π’ LIKELY AUTHENTIC'}</h3>
|
| 94 |
</div>
|
| 95 |
-
|
|
|
|
| 96 |
|
| 97 |
|
| 98 |
<div style="background: #f5f5f5; padding: 15px; margin: 10px 0; border-radius: 5px;">
|
|
|
|
| 78 |
indicators = results.get('indicators', [])
|
| 79 |
|
| 80 |
# Build HTML output
|
| 81 |
+
#html = f"""
|
| 82 |
+
#<div style="font-family: Arial, sans-serif;">
|
| 83 |
+
# <h2>π Analysis Results</h2>"""
|
| 84 |
|
| 85 |
+
# First, define the conditional style string
|
| 86 |
+
style = (
|
| 87 |
+
"background-color: #fee; border-left: 4px solid #f00;"
|
| 88 |
+
if is_fake else
|
| 89 |
+
"background-color: #efe; border-left: 4px solid #0f0;"
|
| 90 |
+
)
|
| 91 |
|
| 92 |
+
# Then build the full HTML block using that style
|
| 93 |
+
html = f"""
|
| 94 |
+
<div style="font-family: Arial, sans-serif;">
|
| 95 |
+
<h2>π Analysis Results</h2>
|
| 96 |
+
|
| 97 |
<div style="{style} padding: 15px; margin: 10px 0;">
|
| 98 |
<h3>{'π΄ LIKELY DEEPFAKE/AI-GENERATED' if is_fake else 'π’ LIKELY AUTHENTIC'}</h3>
|
| 99 |
</div>
|
| 100 |
+
"""
|
| 101 |
+
|
| 102 |
|
| 103 |
|
| 104 |
<div style="background: #f5f5f5; padding: 15px; margin: 10px 0; border-radius: 5px;">
|