gskdsrikrishna commited on
Commit
2b68316
·
verified ·
1 Parent(s): 1b40c5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,7 +19,7 @@ API_KEY_YOUTUBE = os.getenv("YT") # Replace with your YouTube Data API v3 key
19
  youtube = build('youtube', 'v3', developerKey=API_KEY_YOUTUBE)
20
 
21
  # Hugging Face Setup
22
- HF_API_KEY = os.getenv("KEY")
23
  HF_MISTRAL_URL = "https://api-inference.huggingface.co/models/mistralai/Mistral-7B-Instruct-v0.3"
24
 
25
  def chat_with_mistral_hf(prompt):
@@ -136,7 +136,7 @@ def display_google_results(results):
136
 
137
  # News Search Function
138
  def search_news(query, from_date=None, to_date=None):
139
- api_key = '43283de608cc43b7a49ad17ceda39636' # Replace with your News API key
140
  url = f"https://newsapi.org/v2/everything?q={query}&apiKey={api_key}"
141
  if from_date and to_date:
142
  url += f"&from={from_date}&to={to_date}"
 
19
  youtube = build('youtube', 'v3', developerKey=API_KEY_YOUTUBE)
20
 
21
  # Hugging Face Setup
22
+ HF_API_KEY = os.getenv("HF_API")
23
  HF_MISTRAL_URL = "https://api-inference.huggingface.co/models/mistralai/Mistral-7B-Instruct-v0.3"
24
 
25
  def chat_with_mistral_hf(prompt):
 
136
 
137
  # News Search Function
138
  def search_news(query, from_date=None, to_date=None):
139
+ api_key = os.getenv("NEWS_API") # Replace with your News API key
140
  url = f"https://newsapi.org/v2/everything?q={query}&apiKey={api_key}"
141
  if from_date and to_date:
142
  url += f"&from={from_date}&to={to_date}"