cyberandy commited on
Commit
948b2ad
Β·
verified Β·
1 Parent(s): a067d1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +57 -16
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
- 1. Help find products based on user needs
48
- 2. Compare prices and features across different sites
49
- 3. Analyze website usability and product findability
50
- 4. Evaluate product presentation and information quality
51
- 5. Assess the overall e-commerce experience
52
- 6. Analyze structured data implementation:
53
- - Check for Schema.org markup
54
- - Validate JSON-LD implementation
55
- - Evaluate microdata usage
56
- - Assess rich snippet potential
57
- 7. Report on data structure quality:
58
- - Product markup completeness
59
- - Price and availability markup
60
- - Review and rating markup
61
- - Inventory status markup
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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()