Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def extract_text_from_pdf(pdf_path):
|
|
40 |
text += page.get_text()
|
41 |
return text
|
42 |
|
43 |
-
def summarize_text_with_chat(text, max_length=
|
44 |
"""OpenAIのChat APIを使ってテキストを要約。"""
|
45 |
openai.api_key = os.getenv('OPEN_AI_API_KEYS')
|
46 |
trimmed_text = text[:max_length]
|
|
|
40 |
text += page.get_text()
|
41 |
return text
|
42 |
|
43 |
+
def summarize_text_with_chat(text, max_length=10000):
|
44 |
"""OpenAIのChat APIを使ってテキストを要約。"""
|
45 |
openai.api_key = os.getenv('OPEN_AI_API_KEYS')
|
46 |
trimmed_text = text[:max_length]
|