Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,22 +43,62 @@ class AIShoppingAnalyzer:
|
|
| 43 |
return AssistantAgent(
|
| 44 |
name="assistant_agent",
|
| 45 |
description="E-commerce shopping advisor and website analyzer",
|
| 46 |
-
system_message="""You are an expert shopping assistant and e-commerce analyst. Your role is to
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
When working with the websurfer_agent:
|
| 64 |
- Guide their research effectively
|
|
@@ -268,5 +308,6 @@ if __name__ == "__main__":
|
|
| 268 |
except Exception as e:
|
| 269 |
print(f"Unexpected error during setup: {e}")
|
| 270 |
|
|
|
|
| 271 |
iface = create_gradio_interface()
|
| 272 |
iface.launch()
|
|
|
|
| 43 |
return AssistantAgent(
|
| 44 |
name="assistant_agent",
|
| 45 |
description="E-commerce shopping advisor and website analyzer",
|
| 46 |
+
system_message="""You are an expert shopping assistant and e-commerce analyst. Your role is to analyze websites and provide clear, well-formatted reports.
|
| 47 |
+
|
| 48 |
+
Structure your analysis reports as follows:
|
| 49 |
+
|
| 50 |
+
π E-COMMERCE ANALYSIS REPORT
|
| 51 |
+
============================
|
| 52 |
+
Site: [website URL]
|
| 53 |
+
Date: [current date]
|
| 54 |
+
|
| 55 |
+
π FINDABILITY SCORE: [β
β
β
β
β]
|
| 56 |
+
-----------------------------
|
| 57 |
+
β’ Category Organization:
|
| 58 |
+
- Key findings about site structure
|
| 59 |
+
- Navigation paths
|
| 60 |
+
- Filter effectiveness
|
| 61 |
+
|
| 62 |
+
π INFORMATION QUALITY: [β
β
β
β
β]
|
| 63 |
+
------------------------------
|
| 64 |
+
β’ Product Details:
|
| 65 |
+
- Completeness of information
|
| 66 |
+
- Image quality
|
| 67 |
+
- Technical specifications
|
| 68 |
+
β’ Structured Data:
|
| 69 |
+
- Schema markup implementation
|
| 70 |
+
- Rich snippets presence
|
| 71 |
+
|
| 72 |
+
π NAVIGATION & SEARCH: [β
β
β
β
β]
|
| 73 |
+
------------------------------
|
| 74 |
+
β’ Search Functionality:
|
| 75 |
+
- Auto-complete features
|
| 76 |
+
- Filter options
|
| 77 |
+
- Results relevance
|
| 78 |
+
β’ User Experience:
|
| 79 |
+
- Menu structure
|
| 80 |
+
- Mobile responsiveness
|
| 81 |
+
|
| 82 |
+
π° PRICING TRANSPARENCY: [β
β
β
β
β]
|
| 83 |
+
------------------------------
|
| 84 |
+
β’ Price Display:
|
| 85 |
+
- Visibility
|
| 86 |
+
- Special offers
|
| 87 |
+
- Comparison features
|
| 88 |
+
|
| 89 |
+
π OVERALL ASSESSMENT
|
| 90 |
+
-------------------
|
| 91 |
+
[Summary paragraph with key strengths and areas for improvement]
|
| 92 |
+
|
| 93 |
+
π§ TECHNICAL INSIGHTS
|
| 94 |
+
-------------------
|
| 95 |
+
[Details about structured data, meta tags, and technical implementation]
|
| 96 |
+
|
| 97 |
+
Use star ratings (β
β
β
β
β) to indicate performance in each category.
|
| 98 |
+
Format text using markdown for better readability.
|
| 99 |
+
Keep analyses concise but comprehensive.""",
|
| 100 |
+
model_client=self.model_client
|
| 101 |
+
)
|
| 102 |
|
| 103 |
When working with the websurfer_agent:
|
| 104 |
- Guide their research effectively
|
|
|
|
| 308 |
except Exception as e:
|
| 309 |
print(f"Unexpected error during setup: {e}")
|
| 310 |
|
| 311 |
+
# Create and launch the interface
|
| 312 |
iface = create_gradio_interface()
|
| 313 |
iface.launch()
|