Spaces:
Sleeping
Sleeping
Deepak Sahu
commited on
Commit
·
219a526
1
Parent(s):
d6ff5a1
testing preview
Browse files
app.py
CHANGED
@@ -29,8 +29,6 @@ def get_recommendation(book_title: str) -> str:
|
|
29 |
# Compute Simialrity
|
30 |
similarity, ranks = computes_similarity_w_hypothetical(hypothetical_summaries=fake_summaries)
|
31 |
|
32 |
-
return fake_summaries[0]
|
33 |
-
|
34 |
# Get ranked Documents
|
35 |
df_ranked = books_df.iloc[ranks]
|
36 |
df_ranked = df_ranked.reset_index()
|
@@ -62,8 +60,8 @@ def get_recommendation(book_title: str) -> str:
|
|
62 |
|
63 |
# We instantiate the Textbox class
|
64 |
textbox = gr.Textbox(label="Write random title", placeholder="The Man who knew", lines=2)
|
65 |
-
|
66 |
-
output = gr.Textbox(label="something")
|
67 |
demo = gr.Interface(fn=get_recommendation, inputs=textbox, outputs=output)
|
68 |
|
69 |
demo.launch()
|
|
|
29 |
# Compute Simialrity
|
30 |
similarity, ranks = computes_similarity_w_hypothetical(hypothetical_summaries=fake_summaries)
|
31 |
|
|
|
|
|
32 |
# Get ranked Documents
|
33 |
df_ranked = books_df.iloc[ranks]
|
34 |
df_ranked = df_ranked.reset_index()
|
|
|
60 |
|
61 |
# We instantiate the Textbox class
|
62 |
textbox = gr.Textbox(label="Write random title", placeholder="The Man who knew", lines=2)
|
63 |
+
output = [gr.Label(label="Similarity"), gr.HTML(label="Books Descriptions")]
|
64 |
+
# output = gr.Textbox(label="something")
|
65 |
demo = gr.Interface(fn=get_recommendation, inputs=textbox, outputs=output)
|
66 |
|
67 |
demo.launch()
|