SuccessfulCrab commited on
Commit
21fcde9
·
verified ·
1 Parent(s): 346fbbd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +50 -2
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import os
2
  import spaces
3
  import firecrawler
4
- import prompt
5
  import rag
6
  from huggingface_hub import login
7
  import gradio as gr
@@ -36,7 +35,56 @@ def get_answer(url, text):
36
  str: Detailed analysis report
37
  """
38
  # Enhanced prompt with more specific instruction for detailed output
39
- full_prompt = full_prompt.prompt.py
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  answer = agent.run(full_prompt)
41
 
42
 
 
1
  import os
2
  import spaces
3
  import firecrawler
 
4
  import rag
5
  from huggingface_hub import login
6
  import gradio as gr
 
35
  str: Detailed analysis report
36
  """
37
  # Enhanced prompt with more specific instruction for detailed output
38
+ full_prompt = f'''
39
+ COMPREHENSIVE SCAM DETECTION ANALYSIS
40
+
41
+ Objective: Provide a meticulously detailed, structured assessment of potential online risks.
42
+
43
+ ANALYSIS FRAMEWORK:
44
+ 1. RISK LEVEL
45
+ - Explicitly state an overall risk assessment (Low/Medium/High)
46
+
47
+ 2. URL ANALYSIS
48
+ - Detailed breakdown of URL characteristics
49
+ - Domain reputation assessment
50
+ - Technical red flags
51
+ - Registrar and hosting information insights
52
+
53
+ 3. CONTENT EVALUATION
54
+ - Content quality assessment (use execute_firecrawl to retrieve contents sample)
55
+ - Linguistic and communication pattern analysis
56
+ - Consistency and professionalism evaluation
57
+
58
+ 4. SPECIFIC RED FLAGS
59
+ - List at least 5 concrete indicators of potential scam
60
+ - Use Scamwatch reference material (use retriever_tool)
61
+ - Provide specific evidence for each red flag
62
+ - Categorize red flags (e.g., Technical, Financial, Communication)
63
+
64
+ 5. RECOMMENDED ACTIONS
65
+ - Specific, actionable steps for user protection
66
+ - Use Scamwatch reference material (use retriever_tool)
67
+ - Recommended verification methods
68
+ - Suggested reporting channels
69
+ - Personal safety guidelines
70
+
71
+ 6. ADDITIONAL INSIGHTS
72
+ - Contextual background information
73
+ - Potential motivations behind suspicious activity
74
+ - Broader pattern recognition
75
+
76
+ CONTEXT:
77
+ - URL under investigation: {url}
78
+ - User-provided situation description: {text}
79
+
80
+ CRITICAL INSTRUCTIONS:
81
+ - Maintain objective, evidence-based analysis
82
+ - Talk in terms of risks rather then certainties.
83
+ - Focus on user empowerment and protection
84
+ - Use the retriever_tool tool to look up Scamwatch reference information scam types, reporting scams etc. Where possible prioritise this infomration.
85
+
86
+ '''
87
+
88
  answer = agent.run(full_prompt)
89
 
90