SatyamSinghal commited on
Commit
2796a2f
·
verified ·
1 Parent(s): 5e06b40

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -121,7 +121,7 @@ def market_analysis_agent(user_input, history=[]):
121
  # Check if the query is related to cryptocurrency
122
  if "bitcoin" in user_input.lower() or "crypto" in user_input.lower():
123
  # Trigger the fetch_crypto_trends function
124
- crypto_data = fetch_crypto_trends(symbol="BTC", market="USD", api_key="G3NRIAU5OWJZXS2E")
125
  formatted_response = format_response(crypto_data)
126
  else:
127
  # Handle other predefined market queries
@@ -163,7 +163,7 @@ def market_analysis_agent(user_input, history=[]):
163
  return [(user_input, f"Oops, something went wrong: {str(e)}")], history
164
 
165
  def fetch_crypto_trends(symbol="BTC", market="USD", api_key="G3NRIAU5OWJZXS2E"):
166
- url = f'https://www.alphavantage.co/query?function=DIGITAL_CURRENCY_DAILY&symbol={symbol}&market={market}&apikey={api_key}'
167
  try:
168
  response = requests.get(url)
169
  response.raise_for_status() # Raise exception for HTTP errors
 
121
  # Check if the query is related to cryptocurrency
122
  if "bitcoin" in user_input.lower() or "crypto" in user_input.lower():
123
  # Trigger the fetch_crypto_trends function
124
+ crypto_data = fetch_crypto_trends(symbol="BTC", market="EUR", api_key="G3NRIAU5OWJZXS2E")
125
  formatted_response = format_response(crypto_data)
126
  else:
127
  # Handle other predefined market queries
 
163
  return [(user_input, f"Oops, something went wrong: {str(e)}")], history
164
 
165
  def fetch_crypto_trends(symbol="BTC", market="USD", api_key="G3NRIAU5OWJZXS2E"):
166
+ url = f'https://www.alphavantage.co/query?function=DIGITAL_CURRENCY_DAILY&symbol=BTC&market=EUR&apikey={api_key}'
167
  try:
168
  response = requests.get(url)
169
  response.raise_for_status() # Raise exception for HTTP errors