CarlosMalaga
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -181,11 +181,6 @@ def load_model():
|
|
181 |
|
182 |
)
|
183 |
|
184 |
-
retriever_intervention_gpt_llama_taxonomy = GoldenRetriever(
|
185 |
-
question_encoder="models/retriever/intervention/gpt+llama/taxonomy/question_encoder",
|
186 |
-
document_index="models/retriever/intervention/gpt+llama/taxonomy/document_index"
|
187 |
-
|
188 |
-
)
|
189 |
|
190 |
|
191 |
retriever_intervention_gpt_db = GoldenRetriever(
|
@@ -194,11 +189,6 @@ def load_model():
|
|
194 |
|
195 |
)
|
196 |
|
197 |
-
retriever_intervention_gpt_llama_db = GoldenRetriever(
|
198 |
-
question_encoder="models/retriever/intervention/gpt+llama/db/question_encoder",
|
199 |
-
document_index="models/retriever/intervention/gpt+llama/db/document_index"
|
200 |
-
|
201 |
-
)
|
202 |
|
203 |
|
204 |
|
@@ -208,12 +198,6 @@ def load_model():
|
|
208 |
|
209 |
)
|
210 |
|
211 |
-
retriever_outcome_gpt_llama_taxonomy = GoldenRetriever(
|
212 |
-
question_encoder="models/retriever/outcome/gpt+llama/taxonomy/question_encoder",
|
213 |
-
document_index="models/retriever/outcome/gpt+llama/taxonomy/document_index"
|
214 |
-
|
215 |
-
)
|
216 |
-
|
217 |
|
218 |
retriever_outcome_gpt_db = GoldenRetriever(
|
219 |
question_encoder="models/retriever/outcome/gpt/db/question_encoder",
|
@@ -221,18 +205,13 @@ def load_model():
|
|
221 |
|
222 |
)
|
223 |
|
224 |
-
retriever_outcome_gpt_llama_db = GoldenRetriever(
|
225 |
-
question_encoder="models/retriever/outcome/gpt+llama/db/question_encoder",
|
226 |
-
document_index="models/retriever/outcome/gpt+llama/db/document_index"
|
227 |
-
|
228 |
-
)
|
229 |
|
230 |
reader = RelikReaderForSpanExtraction("/home/user/app/models/small-extended-large-batch",
|
231 |
dataset_kwargs={"use_nme": True})
|
232 |
|
233 |
relik_question = Relik(reader=reader, retriever=retriever_question, window_size="none", top_k=100, task="span", device="cpu", document_index_device="cpu")
|
234 |
|
235 |
-
return [relik_question, retriever_intervention_gpt_db, retriever_outcome_gpt_db,
|
236 |
|
237 |
def set_intro(css):
|
238 |
# intro
|
|
|
181 |
|
182 |
)
|
183 |
|
|
|
|
|
|
|
|
|
|
|
184 |
|
185 |
|
186 |
retriever_intervention_gpt_db = GoldenRetriever(
|
|
|
189 |
|
190 |
)
|
191 |
|
|
|
|
|
|
|
|
|
|
|
192 |
|
193 |
|
194 |
|
|
|
198 |
|
199 |
)
|
200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
|
202 |
retriever_outcome_gpt_db = GoldenRetriever(
|
203 |
question_encoder="models/retriever/outcome/gpt/db/question_encoder",
|
|
|
205 |
|
206 |
)
|
207 |
|
|
|
|
|
|
|
|
|
|
|
208 |
|
209 |
reader = RelikReaderForSpanExtraction("/home/user/app/models/small-extended-large-batch",
|
210 |
dataset_kwargs={"use_nme": True})
|
211 |
|
212 |
relik_question = Relik(reader=reader, retriever=retriever_question, window_size="none", top_k=100, task="span", device="cpu", document_index_device="cpu")
|
213 |
|
214 |
+
return [relik_question, retriever_intervention_gpt_db, retriever_outcome_gpt_db, retriever_intervention_gpt_taxonomy, retriever_outcome_gpt_taxonomy]
|
215 |
|
216 |
def set_intro(css):
|
217 |
# intro
|