buildinqq commited on
Commit
8d03c60
·
verified ·
1 Parent(s): 45eb7b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -280,17 +280,10 @@ async def run_function_on_text(top_k,study_obj,study_type,phase,purpose,allocati
280
  else:
281
  continue
282
  n+=1
283
- study_name = re.search(r'Study[_ ]Name:?\s*(.*?)(?=[\n;]|Condition:|Intervention/Treatment:|$)', ref, re.DOTALL).group(1).strip()
284
- condition = re.search(r'Condition:?\s*(.*?)(?=[\n;]|Intervention/Treatment:|$)', ref, re.DOTALL).group(1).strip()
285
  intervention = re.search(r'Intervention/Treatment:?\s*(.*?)(?=\n|$)', ref, re.DOTALL).group(1).strip()
286
 
287
- study_name_match = re.search(r'Study[_ ]Name:?\s*(.*?)(?=\n|;|Condition:|Intervention/Treatment:|$)', ref, re.DOTALL).group(1).strip()
288
- study_name = study_name_match.group(1).strip() if study_name_match else "Not found"
289
- condition_match = re.search(r'Condition:?\s*(.*?)(?=\n|;|Intervention/Treatment:|$)', ref, re.DOTALL).group(1).strip()
290
- condition = condition_match.group(1).strip() if condition_match else "Not found"
291
- intervention_match = re.search(r'Intervention/Treatment:?\s*(.*?)(?=\n|$)', ref, re.DOTALL).group(1).strip()
292
- intervention = intervention_match.group(1).strip() if intervention_match else "Not found"
293
-
294
  study_name = re.sub(r'\*+', '', study_name).strip()
295
  condition = re.sub(r'\*+', '', condition).strip()
296
  intervention = re.sub(r'\*+', '', intervention).strip()
 
280
  else:
281
  continue
282
  n+=1
283
+ study_name = re.search(r'Study[_ ]Name:?\s*(.*?)(?=\n|Condition:|Intervention/Treatment:|$)', ref, re.DOTALL).group(1).strip()
284
+ condition = re.search(r'Condition:?\s*(.*?)(?=\n|Intervention/Treatment:|$)', ref, re.DOTALL).group(1).strip()
285
  intervention = re.search(r'Intervention/Treatment:?\s*(.*?)(?=\n|$)', ref, re.DOTALL).group(1).strip()
286
 
 
 
 
 
 
 
 
287
  study_name = re.sub(r'\*+', '', study_name).strip()
288
  condition = re.sub(r'\*+', '', condition).strip()
289
  intervention = re.sub(r'\*+', '', intervention).strip()