SatyamSinghal commited on
Commit
44fec10
·
verified ·
1 Parent(s): 41dcf3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -3,6 +3,7 @@ import gradio as gr
3
  import openai
4
  from langdetect import detect
5
  import json
 
6
 
7
  # Set up OpenAI API with your custom endpoint
8
  openai.api_key = os.getenv("API_KEY")
@@ -185,7 +186,7 @@ def market_analysis_agent(user_input, history=[]):
185
  except Exception as e:
186
  return [(user_input, f"Oops, something went wrong: {str(e)}")], history
187
 
188
- def fetch_crypto_trends(symbol="BTC", market="USD", api_key="your_api_key_here"):
189
  url = f'https://www.alphavantage.co/query?function=DIGITAL_CURRENCY_DAILY&symbol={symbol}&market={market}&apikey={api_key}'
190
  try:
191
  response = requests.get(url)
 
3
  import openai
4
  from langdetect import detect
5
  import json
6
+ import requests
7
 
8
  # Set up OpenAI API with your custom endpoint
9
  openai.api_key = os.getenv("API_KEY")
 
186
  except Exception as e:
187
  return [(user_input, f"Oops, something went wrong: {str(e)}")], history
188
 
189
+ def fetch_crypto_trends(symbol="BTC", market="USD", api_key="G3NRIAU5OWJZXS2E"):
190
  url = f'https://www.alphavantage.co/query?function=DIGITAL_CURRENCY_DAILY&symbol={symbol}&market={market}&apikey={api_key}'
191
  try:
192
  response = requests.get(url)