Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,14 +13,19 @@ from Gradio_UI import GradioUI
|
|
| 13 |
@tool
|
| 14 |
|
| 15 |
def fetch_movie_from_omdb(genre: str) -> dict:
|
| 16 |
-
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
| 21 |
|
| 22 |
Returns:
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
"""
|
| 25 |
api_key = "59341a1e"
|
| 26 |
url = f"http://www.omdbapi.com/?i=tt3896198&apikey=59341a1e"
|
|
|
|
| 13 |
@tool
|
| 14 |
|
| 15 |
def fetch_movie_from_omdb(genre: str) -> dict:
|
| 16 |
+
"""
|
| 17 |
+
Fetch a movie recommendation from the OMDb API based on a given genre.
|
| 18 |
|
| 19 |
+
Args:
|
| 20 |
+
genre (str): The movie genre to search for (e.g., "Comedy", "Drama", "Sci-Fi").
|
| 21 |
|
| 22 |
Returns:
|
| 23 |
+
dict: A dictionary containing movie details:
|
| 24 |
+
- title (str): The title of the recommended movie.
|
| 25 |
+
- year (str): The release year of the movie.
|
| 26 |
+
- genre (str): The requested genre.
|
| 27 |
+
- imdb_id (str): The IMDb ID of the movie.
|
| 28 |
+
- error (str, optional): An error message if no results are found.
|
| 29 |
"""
|
| 30 |
api_key = "59341a1e"
|
| 31 |
url = f"http://www.omdbapi.com/?i=tt3896198&apikey=59341a1e"
|