shukdevdatta123 commited on
Commit
9433998
·
verified ·
1 Parent(s): 898772e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -167,7 +167,7 @@ def generate_systematic_review(pdf_files, review_question, prisma_numbers, inclu
167
 
168
  Step 4: Define Inclusion and Exclusion Criteria
169
  Clearly articulate the criteria for including or excluding studies in your review. These criteria should be directly tied to your research question and may include: publication date range, study types, population characteristics, intervention specifications, outcome measures, and language restrictions.
170
- neared
171
  Step 5: Evaluate Relevant Literature
172
  Conduct a comprehensive literature search using multiple databases (e.g., PubMed, Scopus, Web of Science, CINAHL) with clearly defined search terms and Boolean operators. Document your search strategy in detail to ensure reproducibility. Consider both published and unpublished (gray) literature to minimize publication bias.
173
 
@@ -189,7 +189,7 @@ def generate_systematic_review(pdf_files, review_question, prisma_numbers, inclu
189
  Step 11: Concluding Statements
190
  Provide clear, substantiated conclusions based on your review findings. Ensure conclusions are proportionate to the evidence presented and acknowledge uncertainty where appropriate. Offer specific recommendations for future research.
191
 
192
- Step 12: References and Documentation Hawkins
193
  Include a comprehensive reference list following a specific citation style (APA, Vancouver, etc.). Provide links to source papers when available.
194
 
195
  Your response should be formatted in HTML (but avoid showing these tags ```html ```) but generate the content to look like a professional academic paper. Include proper section headers, abstracts, methodology sections, etc. Number all sections like an academic paper. Follow academic journal standards with double spacing, appropriate margins, and consistent formatting throughout.
@@ -455,7 +455,9 @@ def save_uploaded_files(files):
455
  if file is not None:
456
  # Create a temporary file
457
  with tempfile.NamedTemporaryFile(delete=False, suffix=".pdf") as tmp_file:
458
- tmp_file.write(file.read()) # Changed from file to file.read()
 
 
459
  saved_paths.append(tmp_file.name)
460
 
461
  return saved_paths
 
167
 
168
  Step 4: Define Inclusion and Exclusion Criteria
169
  Clearly articulate the criteria for including or excluding studies in your review. These criteria should be directly tied to your research question and may include: publication date range, study types, population characteristics, intervention specifications, outcome measures, and language restrictions.
170
+
171
  Step 5: Evaluate Relevant Literature
172
  Conduct a comprehensive literature search using multiple databases (e.g., PubMed, Scopus, Web of Science, CINAHL) with clearly defined search terms and Boolean operators. Document your search strategy in detail to ensure reproducibility. Consider both published and unpublished (gray) literature to minimize publication bias.
173
 
 
189
  Step 11: Concluding Statements
190
  Provide clear, substantiated conclusions based on your review findings. Ensure conclusions are proportionate to the evidence presented and acknowledge uncertainty where appropriate. Offer specific recommendations for future research.
191
 
192
+ Step 12: References and Documentation
193
  Include a comprehensive reference list following a specific citation style (APA, Vancouver, etc.). Provide links to source papers when available.
194
 
195
  Your response should be formatted in HTML (but avoid showing these tags ```html ```) but generate the content to look like a professional academic paper. Include proper section headers, abstracts, methodology sections, etc. Number all sections like an academic paper. Follow academic journal standards with double spacing, appropriate margins, and consistent formatting throughout.
 
455
  if file is not None:
456
  # Create a temporary file
457
  with tempfile.NamedTemporaryFile(delete=False, suffix=".pdf") as tmp_file:
458
+ # Read the content from the file path provided by Gradio
459
+ with open(file, "rb") as src_file:
460
+ tmp_file.write(src_file.read())
461
  saved_paths.append(tmp_file.name)
462
 
463
  return saved_paths