Abid Ali Awan commited on
Commit
3b87708
·
1 Parent(s): 41a9d8b

Enhance app.py by adding warnings filter to ignore DeprecationWarnings, improving user experience. Refactor UIHandler in agents/ui_handler.py to remove unnecessary break condition in results display logic. Update web_tools.py to clarify crawl instructions for regulatory updates, enhancing readability and context.

Browse files
Files changed (3) hide show
  1. agents/ui_handler.py +0 -2
  2. app.py +4 -0
  3. tools/web_tools.py +1 -1
agents/ui_handler.py CHANGED
@@ -116,8 +116,6 @@ class UIHandler:
116
  - Title: {title}...
117
  - URL: {url}
118
  """)
119
- if count >= 5:
120
- break
121
  if results_display:
122
  collapsible_results = f"""
123
  <details>
 
116
  - Title: {title}...
117
  - URL: {url}
118
  """)
 
 
119
  if results_display:
120
  collapsible_results = f"""
121
  <details>
app.py CHANGED
@@ -5,8 +5,12 @@ This application monitors and analyzes regulatory updates, providing
5
  compliance guidance for various industries and regions.
6
  """
7
 
 
 
8
  from agents.ui_handler import UIHandler
9
 
 
 
10
 
11
  def create_demo():
12
  ui_handler = UIHandler() # New user for each session
 
5
  compliance guidance for various industries and regions.
6
  """
7
 
8
+ import warnings
9
+
10
  from agents.ui_handler import UIHandler
11
 
12
+ warnings.filterwarnings("ignore", category=DeprecationWarning)
13
+
14
 
15
  def create_demo():
16
  ui_handler = UIHandler() # New user for each session
tools/web_tools.py CHANGED
@@ -30,7 +30,7 @@ class WebTools:
30
  all_results = []
31
 
32
  crawl_instructions = (
33
- f"{industry} regulatory updates, compliance, {keywords}, 30d"
34
  )
35
 
36
  # Crawl regulatory sites
 
30
  all_results = []
31
 
32
  crawl_instructions = (
33
+ f"Recent {industry} {region} regulatory updates: {keywords}, 30 days"
34
  )
35
 
36
  # Crawl regulatory sites