shukdevdatta123 commited on
Commit
a27dcf5
·
verified ·
1 Parent(s): 0f3cfeb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -43,11 +43,13 @@ def summarize_with_groq(api_key, text):
43
  client = Groq(api_key=api_key.strip())
44
 
45
  # System prompt for summarization
46
- system_prompt = """You are a highly capable language model specialized in document summarization. Your task is to read and understand the full content of a multi-page PDF document and generate a clear, accurate, and concise summary of the entire document.
47
 
48
- Focus on the main ideas, key points, arguments, and conclusions presented throughout the document. If the document is technical, legal, academic, or contains structured sections (e.g., introduction, methods, results, discussion), preserve the logical flow while simplifying complex language. Do not include irrelevant details or copy the text verbatim.
49
 
50
- Output only the summary. Do not explain your process. Maintain a neutral and informative tone. Your summary should be useful to someone who has not read the original document but needs to understand its overall purpose and content."""
 
 
51
 
52
  # Create completion with optimal hyperparameters
53
  completion = client.chat.completions.create(
 
43
  client = Groq(api_key=api_key.strip())
44
 
45
  # System prompt for summarization
46
+ system_prompt = """You are a highly capable language model specialized in document summarization. Your task is to read and understand the full content of a multi-page PDF document and generate a clear, accurate, and detailed summary of the entire document.
47
 
48
+ Focus on capturing all main ideas, key points, arguments, findings, and conclusions presented throughout the document. If the document is technical, legal, academic, or contains structured sections (e.g., introduction, methods, results, discussion), maintain the logical flow and structure while expressing the content in a comprehensive and accessible manner.
49
 
50
+ Avoid unnecessary simplification. Include important details, supporting evidence, and nuanced insights that reflect the depth of the original material. Do not copy the text verbatim.
51
+
52
+ Output only the summary. Do not explain your process. Use a neutral, professional, and informative tone. The summary should provide a full understanding of the document to someone who has not read it."""
53
 
54
  # Create completion with optimal hyperparameters
55
  completion = client.chat.completions.create(