Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -227,7 +227,7 @@ def analyze(pil_image, overlay_strength):
|
|
| 227 |
|
| 228 |
summary = f"## Grade: {grade} — {total_score}/100\n\n"
|
| 229 |
|
| 230 |
-
summary += "**
|
| 231 |
if zones:
|
| 232 |
for z in zones:
|
| 233 |
summary += f"- {z['position'].replace('-', ' ').title()} ({z['intensity']}/100 intensity, {z['area_pct']}% of design)\n"
|
|
@@ -235,9 +235,10 @@ def analyze(pil_image, overlay_strength):
|
|
| 235 |
summary += "- Attention is fairly even across the design, no strong single hotspot.\n"
|
| 236 |
|
| 237 |
summary += (
|
| 238 |
-
f"\n**Scores:**
|
| 239 |
-
f"
|
| 240 |
-
f"
|
|
|
|
| 241 |
)
|
| 242 |
if read['words_checked'] == 0:
|
| 243 |
summary += "no text detected\n"
|
|
@@ -279,4 +280,4 @@ with gr.Blocks(title="Design Analyzer") as demo:
|
|
| 279 |
text_output = gr.Markdown()
|
| 280 |
analyze_btn.click(fn=analyze, inputs=[image_input, strength_slider], outputs=[image_output, text_output])
|
| 281 |
|
| 282 |
-
demo.launch()
|
|
|
|
| 227 |
|
| 228 |
summary = f"## Grade: {grade} — {total_score}/100\n\n"
|
| 229 |
|
| 230 |
+
summary += "**Where Attention Goes First:**\n"
|
| 231 |
if zones:
|
| 232 |
for z in zones:
|
| 233 |
summary += f"- {z['position'].replace('-', ' ').title()} ({z['intensity']}/100 intensity, {z['area_pct']}% of design)\n"
|
|
|
|
| 235 |
summary += "- Attention is fairly even across the design, no strong single hotspot.\n"
|
| 236 |
|
| 237 |
summary += (
|
| 238 |
+
f"\n**Scores:**\n"
|
| 239 |
+
f"- Clear Focal Point: {scores['focus_score']}/100 (how strongly attention lands on one main spot, vs scattered everywhere)\n"
|
| 240 |
+
f"- Attention Coverage: {scores['spread_score']}/100 (how much of the whole design draws some interest, not just one hotspot)\n"
|
| 241 |
+
f"- Readability: "
|
| 242 |
)
|
| 243 |
if read['words_checked'] == 0:
|
| 244 |
summary += "no text detected\n"
|
|
|
|
| 280 |
text_output = gr.Markdown()
|
| 281 |
analyze_btn.click(fn=analyze, inputs=[image_input, strength_slider], outputs=[image_output, text_output])
|
| 282 |
|
| 283 |
+
demo.launch()
|