Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,4 +18,30 @@ Break your analysis into these parts:
|
|
| 18 |
2. Technical SEO (Speed, HTTPS, Schema, Robots.txt)
|
| 19 |
3. On-Page SEO (Headings, Keywords, Alt Tags)
|
| 20 |
4. Content Quality (Readability, Word Count, Keyword Density)
|
| 21 |
-
5. UX and Performance (Mobile-friendliness, CTA, Accessibility
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
2. Technical SEO (Speed, HTTPS, Schema, Robots.txt)
|
| 19 |
3. On-Page SEO (Headings, Keywords, Alt Tags)
|
| 20 |
4. Content Quality (Readability, Word Count, Keyword Density)
|
| 21 |
+
5. UX and Performance (Mobile-friendliness, CTA, Accessibility)
|
| 22 |
+
6. SEO Score (0–100)
|
| 23 |
+
7. Top 5 Priority Recommendations
|
| 24 |
+
"""
|
| 25 |
+
|
| 26 |
+
try:
|
| 27 |
+
response = client.chat.completions.create(
|
| 28 |
+
model="gpt-4",
|
| 29 |
+
messages=[
|
| 30 |
+
{"role": "system", "content": "You are an expert SEO analyst."},
|
| 31 |
+
{"role": "user", "content": prompt}
|
| 32 |
+
]
|
| 33 |
+
)
|
| 34 |
+
return response.choices[0].message.content
|
| 35 |
+
except Exception as e:
|
| 36 |
+
return f"Error: {str(e)}"
|
| 37 |
+
|
| 38 |
+
demo = gr.Interface(
|
| 39 |
+
fn=seo_audit,
|
| 40 |
+
inputs=gr.Textbox(label="Enter Website URL"),
|
| 41 |
+
outputs=gr.Textbox(label="SEO Audit Report", lines=25),
|
| 42 |
+
title="SEOlytics AI",
|
| 43 |
+
description="AI-Powered SEO Analyzer – Just paste a URL and get insights!"
|
| 44 |
+
)
|
| 45 |
+
|
| 46 |
+
if __name__ == "__main__":
|
| 47 |
+
demo.launch()
|