Update app.py
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ def fetch_paper_links(url):
|
|
46 |
|
47 |
def summarize_text_with_chat(text, max_length=10000):
|
48 |
"""テキストをOpenAIのChat APIを使用して要約する。"""
|
49 |
-
openai.api_key = 'OPEN_AI_API_KEYS'
|
50 |
|
51 |
# テキストを指定の最大長に制限
|
52 |
trimmed_text = text[:max_length]
|
@@ -93,7 +93,7 @@ iface = gr.Interface(
|
|
93 |
inputs=[], # 入力部分を削除
|
94 |
outputs=gr.Markdown(),
|
95 |
title="論文要約ツール",
|
96 |
-
description="[Daily Papers](https://huggingface.co/papers)
|
97 |
)
|
98 |
|
99 |
if __name__ == "__main__":
|
|
|
46 |
|
47 |
def summarize_text_with_chat(text, max_length=10000):
|
48 |
"""テキストをOpenAIのChat APIを使用して要約する。"""
|
49 |
+
openai.api_key = os.getenv('OPEN_AI_API_KEYS')
|
50 |
|
51 |
# テキストを指定の最大長に制限
|
52 |
trimmed_text = text[:max_length]
|
|
|
93 |
inputs=[], # 入力部分を削除
|
94 |
outputs=gr.Markdown(),
|
95 |
title="論文要約ツール",
|
96 |
+
description="[Daily Papers](https://huggingface.co/papers)に掲載された本日の論文を取得し、日本語で要約します。"
|
97 |
)
|
98 |
|
99 |
if __name__ == "__main__":
|