pranavinani commited on
Commit
169a6ba
·
1 Parent(s): 0461ca2

modified test_api

Browse files
Files changed (1) hide show
  1. 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
- # Use existing image.png file
7
- url = "http://localhost:7860/analyze"
8
 
9
  with open("image.png", "rb") as f:
10
- files = {"file": ("image.png", f, "image/jpeg")}
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: