Ani14 commited on
Commit
d262e7c
Β·
verified Β·
1 Parent(s): 9d58b9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -24
app.py CHANGED
@@ -329,38 +329,32 @@ if research_button and topic:
329
  ])
330
 
331
 
 
 
 
 
 
 
332
  prompt = f"""
333
  You are an expert research assistant.
334
 
335
- Your tasks are as follows:
336
-
337
- 1. **Chronological Mapping**:
338
- - Begin by outlining the timeline of major ideas, technologies, or findings based on the sources provided.
339
- - Highlight what research or approaches have come **before** in the field.
340
- - This will serve as the foundational timeline to understand the evolution of work in this domain.
341
-
342
- 2. **Gap Identification**:
343
- - Based on the timeline above, identify gaps or underexplored areas in current research.
344
- - Gaps may be due to limited datasets, outdated methods, lack of real-world validation, missing cross-disciplinary approaches, etc.
345
 
346
- 3. **Novel Contribution Proposal**:
347
- - Based on the identified gap, propose a new research direction or project idea that could add value.
348
- - Be innovative yet realistic.
 
 
349
 
350
- 4. **Generate a Research Report**:
351
- - Now write a {report_type.lower()} in a {tone.lower()} tone.
352
- - It should summarize the current state of research (based on sources), highlight the research gap, and introduce your proposed research direction.
353
 
354
- Please base all reasoning and writing only on the content and structure of the sources provided.
355
-
356
- ---
357
-
358
- πŸ“š **Sources to Analyze**:
359
  {combined_text}
360
 
361
- πŸ“Ž **APA Citations**:
362
- {chr(10).join(citations)}
363
- """
364
 
365
  st.subheader(f"πŸ“ {report_type} on '{topic}'")
366
  output_placeholder = st.empty()
 
329
  ])
330
 
331
 
332
+ length_instruction = {
333
+ "Summary": "Keep it short and focused, ideally under 300 words. Use bullet points or clear paragraph breaks to emphasize key points.",
334
+ "Detailed Report": "Provide a well-rounded analysis of the topic in about 500–700 words. Include the research history, identified gaps, and a proposed idea.",
335
+ "Thorough Academic Research": "Write a comprehensive academic-style report. It should include background, detailed timeline, analysis, research gaps, proposed solution, and potential methodologies. Use a formal tone and aim for 1000+ words if needed."
336
+ }[report_type]
337
+
338
  prompt = f"""
339
  You are an expert research assistant.
340
 
341
+ Your task is to write a {report_type.lower()} in a {tone.lower()} tone.
 
 
 
 
 
 
 
 
 
342
 
343
+ πŸ” Use the following structure:
344
+ 1. **Chronological Mapping**: Start by outlining the research progress over time using the provided sources.
345
+ 2. **Gap Identification**: Highlight what hasn't been explored or optimized.
346
+ 3. **Novel Contribution**: Propose a new direction or idea that builds on the gaps.
347
+ 4. **Formatted Report**: Structure the response cleanly with subheadings.
348
 
349
+ βœ‚οΈ Writing Instruction:
350
+ {length_instruction}
 
351
 
352
+ πŸ“š Sources:
 
 
 
 
353
  {combined_text}
354
 
355
+ πŸ“Ž APA Citations:
356
+ {chr(10).join(citations)}"""
357
+
358
 
359
  st.subheader(f"πŸ“ {report_type} on '{topic}'")
360
  output_placeholder = st.empty()