Alptraum commited on
Commit
9be5a81
·
verified ·
1 Parent(s): f8c5079

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -5
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
- Fetches a movie recommendation from the OMDb API based on a given genre.
18
 
19
- Parameters:
20
- - genre (str): The movie genre (e.g., Comedy, Drama, Sci-Fi).
21
 
22
  Returns:
23
- - dict: A dictionary containing movie details such as title, year, and IMDb ID.
 
 
 
 
 
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"