Spaces:
Sleeping
Sleeping
pranavinani commited on
Commit ·
169a6ba
1
Parent(s): 0461ca2
modified test_api
Browse files- test_api.py +3 -3
test_api.py
CHANGED
|
@@ -3,11 +3,11 @@ import json
|
|
| 3 |
|
| 4 |
# Test the API
|
| 5 |
def test_api():
|
| 6 |
-
#
|
| 7 |
-
url = "
|
| 8 |
|
| 9 |
with open("image.png", "rb") as f:
|
| 10 |
-
files = {"file": ("image.png", f, "image/
|
| 11 |
response = requests.post(url, files=files)
|
| 12 |
|
| 13 |
if response.status_code == 200:
|
|
|
|
| 3 |
|
| 4 |
# Test the API
|
| 5 |
def test_api():
|
| 6 |
+
# Test deployed Hugging Face Space
|
| 7 |
+
url = "https://pranavinani-gaze-emotion-api.hf.space/analyze"
|
| 8 |
|
| 9 |
with open("image.png", "rb") as f:
|
| 10 |
+
files = {"file": ("image.png", f, "image/png")}
|
| 11 |
response = requests.post(url, files=files)
|
| 12 |
|
| 13 |
if response.status_code == 200:
|