Spaces:
Build error
Build error
File size: 469 Bytes
81c58dc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import requests
# set the search item
search_item = 'a duck'
# provide a list of videos
video_files = ["video.mp4", "video1.mp4"]
# send a POST request to the API endpoint
response = requests.post('http://localhost:5000/search_videos',
data={'search_item': search_item},
files=[("videos", open(video, "rb")) for video in video_files])
# print the list of matching videos returned by the API
print(response.json())
|