wt002 commited on
Commit
8289a44
·
verified ·
1 Parent(s): f71d65e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -210,7 +210,7 @@ class BasicAgent:
210
  entities = [e[0] for e in analysis['entities']]
211
  pattern = r'(\b\d+\b)[^\.]*\b(' + '|'.join(re.escape(e) for e in entities) + r')\b'
212
  matches = re.finditer(pattern, text, re.IGNORECASE)
213
- counts = [int(match.group(1))) for match in matches]
214
  return max(counts) if counts else None
215
 
216
  def _extract_date(self, text, analysis):
 
210
  entities = [e[0] for e in analysis['entities']]
211
  pattern = r'(\b\d+\b)[^\.]*\b(' + '|'.join(re.escape(e) for e in entities) + r')\b'
212
  matches = re.finditer(pattern, text, re.IGNORECASE)
213
+ counts = [int(match.group(1)) for match in matches]
214
  return max(counts) if counts else None
215
 
216
  def _extract_date(self, text, analysis):