Upload folder using huggingface_hub
Browse files- __pycache__/request_api.cpython-38.pyc +0 -0
- request_api.py +12 -10
__pycache__/request_api.cpython-38.pyc
CHANGED
Binary files a/__pycache__/request_api.cpython-38.pyc and b/__pycache__/request_api.cpython-38.pyc differ
|
|
request_api.py
CHANGED
@@ -15,16 +15,18 @@ BASE_URL = 'https://6146-134-28-45-21.ngrok-free.app/'
|
|
15 |
|
16 |
def make_get_request(endpoint,params):
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
28 |
return response
|
29 |
|
30 |
|
|
|
15 |
|
16 |
def make_get_request(endpoint,params):
|
17 |
|
18 |
+
try:
|
19 |
+
# Make a GET request to the endpoint
|
20 |
+
response = requests.get(
|
21 |
+
url = f'{BASE_URL}{endpoint}',
|
22 |
+
params=params,
|
23 |
+
verify=False
|
24 |
+
)
|
25 |
+
print(response.url)
|
26 |
+
# Check if the response is successful
|
27 |
+
except requests.RequestException as e:
|
28 |
+
print(f"Request failed: {e}")
|
29 |
+
return None
|
30 |
return response
|
31 |
|
32 |
|