Update app.py
Browse files
app.py
CHANGED
@@ -13,8 +13,18 @@ PER_PAGE = 5
|
|
13 |
# --- Function to search Pixabay ---
|
14 |
def search_pixabay(query: str, media_type: str, image_type: str, orientation: str, video_type: str):
|
15 |
"""
|
16 |
-
Searches Pixabay API
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
"""
|
19 |
if not query:
|
20 |
return None, None, "Please enter a search query."
|
|
|
13 |
# --- Function to search Pixabay ---
|
14 |
def search_pixabay(query: str, media_type: str, image_type: str, orientation: str, video_type: str):
|
15 |
"""
|
16 |
+
Searches the Pixabay API for royalty-free stock images or videos based on user query and filters.
|
17 |
+
|
18 |
+
Args:
|
19 |
+
query (str): The search term for finding media. If empty, an error is returned.
|
20 |
+
media_type (str): Specifies the type of media to search for.
|
21 |
+
Accepted values are "Image" or "Video".
|
22 |
+
image_type (str): Filter results by image type (used only if media_type is "Image").
|
23 |
+
Accepted values: "all", "photo", "illustration", "vector".
|
24 |
+
orientation (str): Filter results by image orientation (used only if media_type is "Image").
|
25 |
+
Accepted values: "all", "horizontal", "vertical".
|
26 |
+
video_type (str): Filter results by video type (used only if media_type is "Video").
|
27 |
+
Accepted values: "all", "film", "animation".
|
28 |
"""
|
29 |
if not query:
|
30 |
return None, None, "Please enter a search query."
|