Spaces:
Runtime error
Runtime error
Add description
Browse files
app.py
CHANGED
@@ -36,10 +36,22 @@ def add_descriptions_to_results(results: pd.DataFrame):
|
|
36 |
|
37 |
# Input UI
|
38 |
st.title("Manga Semantic Search")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
query = st.text_input(
|
40 |
"Enter a description of the manga you are searching for:",
|
41 |
value="",
|
42 |
)
|
|
|
|
|
43 |
embeddings_path = st.selectbox("Embeddings Corpus", os.listdir("embeddings"))
|
44 |
top_k = st.number_input(
|
45 |
"Number of results", value=5, min_value=1, max_value=100, step=1
|
@@ -75,7 +87,7 @@ if st.button("Search"):
|
|
75 |
"'Number of results' should be less than or equal to 'Number of number of initialy retrieved series'"
|
76 |
)
|
77 |
else:
|
78 |
-
# Load
|
79 |
with open(embeddings_path, "rb") as f:
|
80 |
data, corpus_embeddings = pickle.load(f).values()
|
81 |
|
|
|
36 |
|
37 |
# Input UI
|
38 |
st.title("Manga Semantic Search")
|
39 |
+
st.markdown(
|
40 |
+
"""
|
41 |
+
An application to search for manga series using text descriptions of it's content. Find the name of a series based on a vague recollection about its story.
|
42 |
+
Performs a semantic retrieve and re-rank search using Sentence Transform models.
|
43 |
+
Source code for this application can be found in the repo [here](https://github.com/bwconrad/manga-semantic-search).
|
44 |
+
|
45 |
+
__Note__: The current database only includes the top-1000 manga series on AniList.
|
46 |
+
"""
|
47 |
+
)
|
48 |
+
|
49 |
query = st.text_input(
|
50 |
"Enter a description of the manga you are searching for:",
|
51 |
value="",
|
52 |
)
|
53 |
+
|
54 |
+
|
55 |
embeddings_path = st.selectbox("Embeddings Corpus", os.listdir("embeddings"))
|
56 |
top_k = st.number_input(
|
57 |
"Number of results", value=5, min_value=1, max_value=100, step=1
|
|
|
87 |
"'Number of results' should be less than or equal to 'Number of number of initialy retrieved series'"
|
88 |
)
|
89 |
else:
|
90 |
+
# Load embeddings and corresponding data table
|
91 |
with open(embeddings_path, "rb") as f:
|
92 |
data, corpus_embeddings = pickle.load(f).values()
|
93 |
|