CosmoAI commited on
Commit
6873977
1 Parent(s): 5d8c89a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -23,7 +23,7 @@ def make_call(api):
23
  # print(response.text) # Return the response for further processing
24
  return chat_completion.choices[0].message.content
25
  except Exception as e:
26
- print(f"API call failed for key {api_key}: {e}")
27
  return None # Indicate failur
28
 
29
  api1 = os.environ.get("GROQ_API_KEY"),
@@ -47,7 +47,7 @@ for api in apis:
47
  st.write(chat_completion.choices[0].message.content)
48
  break # Exit both the for loop and while loop
49
  else:
50
- st.write(f"Failed to retrieve data from key {api_key}.")
51
  # if data: # If a successful response was found, break the outer while loop
52
  # break
53
 
 
23
  # print(response.text) # Return the response for further processing
24
  return chat_completion.choices[0].message.content
25
  except Exception as e:
26
+ print(f"API call failed for: {e}")
27
  return None # Indicate failur
28
 
29
  api1 = os.environ.get("GROQ_API_KEY"),
 
47
  st.write(chat_completion.choices[0].message.content)
48
  break # Exit both the for loop and while loop
49
  else:
50
+ st.write(f"Failed to retrieve data from.")
51
  # if data: # If a successful response was found, break the outer while loop
52
  # break
53