Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -74,31 +74,14 @@ apis = [
|
|
74 |
|
75 |
|
76 |
# Loop indefinitely
|
77 |
-
|
78 |
data = None
|
79 |
-
|
80 |
# while True: # Loop indefinitely
|
81 |
-
|
82 |
for api in apis:
|
83 |
-
|
84 |
-
data = make_call(api1)
|
85 |
-
|
86 |
if data: # Check for a successful response
|
87 |
-
|
88 |
st.write(data)
|
89 |
-
|
90 |
break # Exit both the for loop and while loop
|
91 |
-
|
92 |
else:
|
93 |
-
|
94 |
-
|
95 |
-
data = make_call(api2)
|
96 |
-
|
97 |
-
if data: # Check for a successful response
|
98 |
-
|
99 |
-
st.write(data)
|
100 |
-
#st.write(f"Failed to retrieve data from.")
|
101 |
-
|
102 |
# if data: # If a successful response was found, break the outer while loop
|
103 |
-
|
104 |
# break
|
|
|
74 |
|
75 |
|
76 |
# Loop indefinitely
|
|
|
77 |
data = None
|
|
|
78 |
# while True: # Loop indefinitely
|
|
|
79 |
for api in apis:
|
80 |
+
data = make_call(api)
|
|
|
|
|
81 |
if data: # Check for a successful response
|
|
|
82 |
st.write(data)
|
|
|
83 |
break # Exit both the for loop and while loop
|
|
|
84 |
else:
|
85 |
+
st.write(f"Failed to retrieve data from.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
# if data: # If a successful response was found, break the outer while loop
|
|
|
87 |
# break
|