tannu038 commited on
Commit
c05cea2
·
verified ·
1 Parent(s): 64de282

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -7,7 +7,7 @@ def extract_study_timeline(text):
7
  """
8
 
9
  screening = re.search(r'(?:Screening(?:\s*phase| period)?|Pre-study observation)\s*(?:of|:|-)?\s*(\d+)\s*weeks?', text, re.IGNORECASE)
10
- treatment = re.search(r'(?:Treatment(?:\s*period)?|Intervention|Therapy|Dosing phase)\s*(?:of|:|-)?\s*(\d+)\s*weeks?', text, re.IGNORECASE)
11
  follow_up = re.search(r'(?:Follow[-\s]*up(?:\s*phase| period)?|Recovery|Post-study monitoring)\s*(?:of|:|-)?\s*(\d+)\s*weeks?', text, re.IGNORECASE)
12
 
13
  timeline = {
 
7
  """
8
 
9
  screening = re.search(r'(?:Screening(?:\s*phase| period)?|Pre-study observation)\s*(?:of|:|-)?\s*(\d+)\s*weeks?', text, re.IGNORECASE)
10
+ treatment = re.search(r'(?:Treatment(?:\s*period)?|Intervention|Therapy|Dosing phase)[^,]*?\s*(\d+)\s*weeks?', text, re.IGNORECASE)
11
  follow_up = re.search(r'(?:Follow[-\s]*up(?:\s*phase| period)?|Recovery|Post-study monitoring)\s*(?:of|:|-)?\s*(\d+)\s*weeks?', text, re.IGNORECASE)
12
 
13
  timeline = {