Commit ·
824fcc0
1
Parent(s): 834fe53
Update gradio_app.py
Browse files- gradio_app.py +3 -2
gradio_app.py
CHANGED
|
@@ -117,13 +117,14 @@ def display_movie(movie, rating):
|
|
| 117 |
# Return the input movie name and poster
|
| 118 |
return f"You entered {movie} with rating {rating}", poster, ""
|
| 119 |
|
|
|
|
| 120 |
iface = gr.Interface(
|
| 121 |
|
| 122 |
fn= display_movie,
|
| 123 |
inputs= [gr.Textbox(label="Enter a movie name"), gr.Slider(minimum=0, maximum=5, step=1, label="Rate the movie")],
|
| 124 |
outputs= [gr.Textbox(label="Output", min_width=200), gr.components.Image(label="Poster", height=400, width=300), gr.components.HTML(label="Recommendations", height=400)],
|
| 125 |
-
|
| 126 |
-
|
| 127 |
)
|
| 128 |
|
| 129 |
iface.launch()
|
|
|
|
| 117 |
# Return the input movie name and poster
|
| 118 |
return f"You entered {movie} with rating {rating}", poster, ""
|
| 119 |
|
| 120 |
+
# Gradio Interface
|
| 121 |
iface = gr.Interface(
|
| 122 |
|
| 123 |
fn= display_movie,
|
| 124 |
inputs= [gr.Textbox(label="Enter a movie name"), gr.Slider(minimum=0, maximum=5, step=1, label="Rate the movie")],
|
| 125 |
outputs= [gr.Textbox(label="Output", min_width=200), gr.components.Image(label="Poster", height=400, width=300), gr.components.HTML(label="Recommendations", height=400)],
|
| 126 |
+
live= False,
|
| 127 |
+
examples=[["The Matrix"], ["The Lion King"], ["Titanic"], ['Fight Club'], ["Inception"]]
|
| 128 |
)
|
| 129 |
|
| 130 |
iface.launch()
|