ayush-kale-96 commited on
Commit
aa4ba7c
Β·
verified Β·
1 Parent(s): 7a15384

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -10
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
- <div style="font-family: Arial, sans-serif;">
83
- <h2>πŸ“Š Analysis Results</h2>"""
84
 
85
- style = (
86
- "background-color: #fee; border-left: 4px solid #f00;"
87
- if is_fake else
88
- "background-color: #efe; border-left: 4px solid #0f0;"
89
- )
 
90
 
91
- html = f"""
 
 
 
 
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;">