Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
47 |
|
48 |
-
Focus on
|
49 |
|
50 |
-
|
|
|
|
|
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(
|