Dmitry Beresnev commited on
Commit
41f5ef9
·
1 Parent(s): 0f98bc8

fix max tickers limit

Browse files
Files changed (1) hide show
  1. ocr_parser.py +3 -1
ocr_parser.py CHANGED
@@ -16,6 +16,9 @@ import pytesseract
16
  import numpy as np
17
 
18
 
 
 
 
19
  # Multiple regex patterns to handle different formats
20
  TICKER_PATTERNS = [
21
  # Pattern 1: Ticker followed by amount (AAPL 5000 or AAPL $5,000.00)
@@ -417,7 +420,6 @@ def validate_portfolio_json(json_str: str) -> Tuple[bool, Optional[Dict[str, flo
417
  return False, None, "Portfolio must contain at least one ticker"
418
 
419
  # Check we don't exceed maximum tickers (optional limit)
420
- MAX_TICKERS = 20
421
  if len(portfolio) > MAX_TICKERS:
422
  return False, None, f"Portfolio exceeds maximum of {MAX_TICKERS} tickers"
423
 
 
16
  import numpy as np
17
 
18
 
19
+ MAX_TICKERS = 100
20
+
21
+
22
  # Multiple regex patterns to handle different formats
23
  TICKER_PATTERNS = [
24
  # Pattern 1: Ticker followed by amount (AAPL 5000 or AAPL $5,000.00)
 
420
  return False, None, "Portfolio must contain at least one ticker"
421
 
422
  # Check we don't exceed maximum tickers (optional limit)
 
423
  if len(portfolio) > MAX_TICKERS:
424
  return False, None, f"Portfolio exceeds maximum of {MAX_TICKERS} tickers"
425