Update app.py
Browse files
app.py
CHANGED
|
@@ -53,15 +53,23 @@ def vector_search(query):
|
|
| 53 |
# Gradio Interface
|
| 54 |
def movie_search(query):
|
| 55 |
return vector_search(query)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
-
|
| 58 |
-
inputs=gr.inputs.Textbox(label="Enter your query"),
|
| 59 |
-
outputs="text",
|
| 60 |
-
live=True,
|
| 61 |
-
title="Netflix Recommendation System",
|
| 62 |
-
description="Enter a query to get Netflix recommendations based on description and genre.")
|
| 63 |
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
|
| 67 |
# demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
|
|
|
| 53 |
# Gradio Interface
|
| 54 |
def movie_search(query):
|
| 55 |
return vector_search(query)
|
| 56 |
+
with gr.Blocks(title="Netflix Recommendation System", description="Enter a query to receive Netflix show recommendations based on title, description, and genre.") as demo:
|
| 57 |
+
query = gr.Textbox(label="Enter your query")
|
| 58 |
+
output = gr.Textbox(label="Recommendations")
|
| 59 |
+
submit_button = gr.Button("Submit")
|
| 60 |
|
| 61 |
+
submit_button.click(fn=movie_search, inputs=query, outputs=output)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
+
demo.launch()
|
| 64 |
+
|
| 65 |
+
# iface = gr.Interface(fn=movie_search,
|
| 66 |
+
# inputs=gr.inputs.Textbox(label="Enter your query"),
|
| 67 |
+
# outputs="text",
|
| 68 |
+
# live=True,
|
| 69 |
+
# title="Netflix Recommendation System",
|
| 70 |
+
# description="Enter a query to get Netflix recommendations based on description and genre.")
|
| 71 |
+
|
| 72 |
+
# iface.launch()
|
| 73 |
|
| 74 |
|
| 75 |
# demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|