Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -284,6 +284,13 @@ async def run_function_on_text(top_k,study_obj,study_type,phase,purpose,allocati
|
|
| 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()
|
|
|
|
| 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()
|