Spaces:
Sleeping
Sleeping
Commit ·
d541a70
1
Parent(s): e8299fb
Update app.py
Browse files
app.py
CHANGED
|
@@ -159,7 +159,7 @@ class model:
|
|
| 159 |
else: return inference_loss
|
| 160 |
|
| 161 |
|
| 162 |
-
def T2Isearch(self, query, focussed_word,
|
| 163 |
# Encode the text query
|
| 164 |
inputs = text_tokenizer([query, focussed_word], padding=True, return_tensors="pt")
|
| 165 |
outputs = text_model(**inputs)
|
|
@@ -221,4 +221,4 @@ Focussed_word = st.text_input("Enter your focussed word here:")
|
|
| 221 |
if st.button("Search"):
|
| 222 |
LCM = model(d, "pascal")
|
| 223 |
if query:
|
| 224 |
-
LCM.T2Isearch(query, Focussed_word
|
|
|
|
| 159 |
else: return inference_loss
|
| 160 |
|
| 161 |
|
| 162 |
+
def T2Isearch(self, query, focussed_word, k=50):
|
| 163 |
# Encode the text query
|
| 164 |
inputs = text_tokenizer([query, focussed_word], padding=True, return_tensors="pt")
|
| 165 |
outputs = text_model(**inputs)
|
|
|
|
| 221 |
if st.button("Search"):
|
| 222 |
LCM = model(d, "pascal")
|
| 223 |
if query:
|
| 224 |
+
LCM.T2Isearch(query, Focussed_word)
|