JackRabbit commited on
Commit ·
3eddef9
1
Parent(s): 9b88ce2
debug added
Browse files
app.py
CHANGED
|
@@ -122,7 +122,13 @@ def run_api(predictor):
|
|
| 122 |
?api=1&image_url=https://somewhere.com/bee.jpg
|
| 123 |
"""
|
| 124 |
params = st.query_params # Replaced st.experimental_get_query_params with st.query_params
|
| 125 |
-
image_url = params.get("image_url")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
|
| 127 |
if not image_url:
|
| 128 |
st.json({"error": "No 'image_url' provided. Example: ?api=1&image_url=<URL>"})
|
|
|
|
| 122 |
?api=1&image_url=https://somewhere.com/bee.jpg
|
| 123 |
"""
|
| 124 |
params = st.query_params # Replaced st.experimental_get_query_params with st.query_params
|
| 125 |
+
# image_url = params.get("image_url", )
|
| 126 |
+
image_url = params.get("image_url", [None])[0]
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
st.write("DEBUG: We are inside run_api()!")
|
| 130 |
+
st.write("DEBUG: st.query_params:", params)
|
| 131 |
+
|
| 132 |
|
| 133 |
if not image_url:
|
| 134 |
st.json({"error": "No 'image_url' provided. Example: ?api=1&image_url=<URL>"})
|