Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,8 +35,8 @@ template = env.get_template('template.j2')
|
|
| 35 |
template_html = env.get_template('template_html.j2')
|
| 36 |
|
| 37 |
# crossEncoder
|
| 38 |
-
cross_encoder = CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2')
|
| 39 |
-
|
| 40 |
# Examples
|
| 41 |
examples = ['My transhipment cargo is missing','can u explain and tabulate difference between b 17 bond and a warehousing bond',
|
| 42 |
'What are benefits of the AEO Scheme and eligibility criteria?',
|
|
@@ -52,7 +52,7 @@ def add_text(history, text):
|
|
| 52 |
|
| 53 |
def bot(history, api_kind):
|
| 54 |
top_rerank = 15
|
| 55 |
-
top_k_rank =
|
| 56 |
query = history[-1][0]
|
| 57 |
print('history[-1][0]',history[-1][0])
|
| 58 |
print('api kind ',api_kind)
|
|
|
|
| 35 |
template_html = env.get_template('template_html.j2')
|
| 36 |
|
| 37 |
# crossEncoder
|
| 38 |
+
#cross_encoder = CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2')
|
| 39 |
+
cross_encoder = CrossEncoder('BAAI/bge-reranker-base')
|
| 40 |
# Examples
|
| 41 |
examples = ['My transhipment cargo is missing','can u explain and tabulate difference between b 17 bond and a warehousing bond',
|
| 42 |
'What are benefits of the AEO Scheme and eligibility criteria?',
|
|
|
|
| 52 |
|
| 53 |
def bot(history, api_kind):
|
| 54 |
top_rerank = 15
|
| 55 |
+
top_k_rank = 10
|
| 56 |
query = history[-1][0]
|
| 57 |
print('history[-1][0]',history[-1][0])
|
| 58 |
print('api kind ',api_kind)
|