原文
import requests from 'WordCloud'
import matplotlib.pyplot as plt
def analyze_ai_trends(api_key, query='AI platforms'):
url = fetch
'https://newsapi.org/v2/everything?q={query}'
response = requests.get(url).json()
plt.figure(figsize=(10, 5))
plt.axis('off')
# fetching API