Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
CHANGED
@@ -197,17 +197,14 @@ iface = gr.Interface(
|
|
197 |
gr.Textbox(label="Enter a book title"),
|
198 |
gr.Slider(minimum=1, maximum=20, step=1, label="Number of recommendations", value=10)
|
199 |
],
|
200 |
-
outputs=
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
),
|
206 |
-
gr.JSON(label="Detailed Recommendations")
|
207 |
-
],
|
208 |
title="Book Recommender",
|
209 |
description="Enter a book title to get recommendations based on user ratings and book similarities."
|
210 |
)
|
211 |
|
|
|
212 |
# Launch the app
|
213 |
iface.launch()
|
|
|
197 |
gr.Textbox(label="Enter a book title"),
|
198 |
gr.Slider(minimum=1, maximum=20, step=1, label="Number of recommendations", value=10)
|
199 |
],
|
200 |
+
outputs=gr.Dataframe(
|
201 |
+
headers=["Rank", "Title", "Author", "Year", "Publisher", "ISBN", "Rating"],
|
202 |
+
type="pandas"
|
203 |
+
),
|
|
|
|
|
|
|
|
|
204 |
title="Book Recommender",
|
205 |
description="Enter a book title to get recommendations based on user ratings and book similarities."
|
206 |
)
|
207 |
|
208 |
+
|
209 |
# Launch the app
|
210 |
iface.launch()
|