Spaces:
Sleeping
Sleeping
Moiz
commited on
Commit
·
b754266
1
Parent(s):
90326d2
debugged
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import requests
|
|
5 |
def fetch_movie_info():
|
6 |
api_key = "f2443b04"
|
7 |
movie_id = "tt1305806" # Fixed movie ID
|
8 |
-
url = f"http://www.omdbapi.com/?apikey={api_key}&i={movie_id}
|
9 |
response = requests.get(url)
|
10 |
|
11 |
if response.status_code == 200:
|
@@ -37,9 +37,10 @@ with gr.Blocks(css="styles.css") as app:
|
|
37 |
gr.Markdown(
|
38 |
"This app automatically fetches and displays information about the movie: *The Secret in Their Eyes*."
|
39 |
)
|
40 |
-
output = gr.Textbox(
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
44 |
|
45 |
app.launch()
|
|
|
5 |
def fetch_movie_info():
|
6 |
api_key = "f2443b04"
|
7 |
movie_id = "tt1305806" # Fixed movie ID
|
8 |
+
url = f"http://www.omdbapi.com/?apikey={api_key}&i={movie_id}"
|
9 |
response = requests.get(url)
|
10 |
|
11 |
if response.status_code == 200:
|
|
|
37 |
gr.Markdown(
|
38 |
"This app automatically fetches and displays information about the movie: *The Secret in Their Eyes*."
|
39 |
)
|
40 |
+
output = gr.Textbox(
|
41 |
+
label="Movie Details",
|
42 |
+
lines=10,
|
43 |
+
value=fetch_movie_info() # Assign fetched movie details directly
|
44 |
+
)
|
45 |
|
46 |
app.launch()
|