Spaces:
Running
Running
Update app.py
Browse files
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
|
| 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
|
| 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 |
|