CosmoAI commited on
Commit
14d3a4a
1 Parent(s): ce2abbe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -37,16 +37,16 @@ apis = [
37
 
38
  # Loop indefinitely
39
  data = None
40
- while True: # Loop indefinitely
41
- for api in apis:
42
- data = make_call(api)
43
- if data: # Check for a successful response
44
- st.write(chat_completion.choices[0].message.content)
45
- break # Exit both the for loop and while loop
46
- else:
47
- st.write(f"Failed to retrieve data from key {api_key}.")
48
- if data: # If a successful response was found, break the outer while loop
49
- break
50
 
51
 
52
 
 
37
 
38
  # Loop indefinitely
39
  data = None
40
+ # while True: # Loop indefinitely
41
+ for api in apis:
42
+ data = make_call(api)
43
+ if data: # Check for a successful response
44
+ st.write(chat_completion.choices[0].message.content)
45
+ break # Exit both the for loop and while loop
46
+ else:
47
+ st.write(f"Failed to retrieve data from key {api_key}.")
48
+ # if data: # If a successful response was found, break the outer while loop
49
+ # break
50
 
51
 
52