Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ def summarize_content(content, language):
|
|
45 |
try:
|
46 |
# Generate summary using the OpenAI Chat API
|
47 |
response = openai.chat.completions.create(
|
48 |
-
model="gpt-4o
|
49 |
messages=[
|
50 |
{"role": "system", "content": f"You are a highly skilled news editor and summarization assistant. Your task is to produce clear, concise, and accurate summaries of news articles {language_prompts[language]}. Focus on capturing the key points, context, and implications while preserving the original tone and intent of the article. Ensure the summary is engaging, fact-based, and suitable for readers seeking a quick yet comprehensive understanding of the news."},
|
51 |
{"role": "user", "content": prompt}
|
|
|
45 |
try:
|
46 |
# Generate summary using the OpenAI Chat API
|
47 |
response = openai.chat.completions.create(
|
48 |
+
model="gpt-4o", # Use the latest GPT model
|
49 |
messages=[
|
50 |
{"role": "system", "content": f"You are a highly skilled news editor and summarization assistant. Your task is to produce clear, concise, and accurate summaries of news articles {language_prompts[language]}. Focus on capturing the key points, context, and implications while preserving the original tone and intent of the article. Ensure the summary is engaging, fact-based, and suitable for readers seeking a quick yet comprehensive understanding of the news."},
|
51 |
{"role": "user", "content": prompt}
|