FutureMa commited on
Commit
afe5614
·
1 Parent(s): aef95b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -2,11 +2,12 @@ import asyncio
2
  from gnews import GNews
3
  import fastapi_poe as fp
4
  import gradio as gr
 
5
 
6
  # 初始化GNews
7
  google_news = GNews(language='en', country='US')
8
 
9
- api_key = 'Mz4yhxQiIySrGas7qGElXtnYgzJCyJDUltrpFcZpolI' # 确保替换为你的API密钥
10
 
11
  # 定义异步函数来生成每个新闻的博客文章
12
  async def generate_blog_for_news(article, index):
 
2
  from gnews import GNews
3
  import fastapi_poe as fp
4
  import gradio as gr
5
+ import os
6
 
7
  # 初始化GNews
8
  google_news = GNews(language='en', country='US')
9
 
10
+ api_key = os.getenv('API_KEY') # 确保替换为你的API密钥
11
 
12
  # 定义异步函数来生成每个新闻的博客文章
13
  async def generate_blog_for_news(article, index):