Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,11 +32,14 @@ user_query = st_tags(
|
|
32 |
# Add selectbox in streamlit
|
33 |
option1 = st.sidebar.selectbox(
|
34 |
'Which transformers model would you like to be selected?',
|
35 |
-
('multi-qa-MiniLM-L6-cos-v1'))
|
36 |
|
37 |
option2 = st.sidebar.selectbox(
|
38 |
'Which corss-encoder model would you like to be selected?',
|
39 |
-
('cross-encoder/ms-marco-MiniLM-L-6-v2'))
|
|
|
|
|
|
|
40 |
|
41 |
if not torch.cuda.is_available():
|
42 |
print("Warning: No GPU found. Please add GPU to your notebook")
|
@@ -130,4 +133,5 @@ def search(query):
|
|
130 |
|
131 |
st.write("## Results:")
|
132 |
if st.button('Generate Sentence'):
|
133 |
-
out = search(query = user_query)
|
|
|
|
32 |
# Add selectbox in streamlit
|
33 |
option1 = st.sidebar.selectbox(
|
34 |
'Which transformers model would you like to be selected?',
|
35 |
+
('multi-qa-MiniLM-L6-cos-v1','null','null'))
|
36 |
|
37 |
option2 = st.sidebar.selectbox(
|
38 |
'Which corss-encoder model would you like to be selected?',
|
39 |
+
('cross-encoder/ms-marco-MiniLM-L-6-v2','null','null'))
|
40 |
+
|
41 |
+
search=pipeline(option)
|
42 |
+
st.sidebar.success("Load Successfully!")
|
43 |
|
44 |
if not torch.cuda.is_available():
|
45 |
print("Warning: No GPU found. Please add GPU to your notebook")
|
|
|
133 |
|
134 |
st.write("## Results:")
|
135 |
if st.button('Generate Sentence'):
|
136 |
+
out = search(query = user_query)
|
137 |
+
st.success(out)
|