Spaces:
Runtime error
Runtime error
NCTCMumbai
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -38,8 +38,8 @@ template_html = env.get_template('template_html.j2')
|
|
38 |
#cross_encoder = CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2')
|
39 |
#cross_encoder = CrossEncoder('BAAI/bge-reranker-base')
|
40 |
# Examples
|
41 |
-
examples = ['
|
42 |
-
'
|
43 |
]
|
44 |
|
45 |
|
@@ -103,7 +103,7 @@ def bot(history, cross_encoder):
|
|
103 |
|
104 |
with gr.Blocks(theme='Insuz/SimpleIndigo') as demo:
|
105 |
gr.HTML(value="""<div style="display: flex; align-items: center; justify-content: space-between;">
|
106 |
-
<h1 style="color: #008000">
|
107 |
<img src='logo.png' alt="Chatbot" width="50" height="50" />
|
108 |
</div>""",elem_id='heading')
|
109 |
gr.HTML(value="""<p style="font-family: sans-serif; font-size: 16px;">A free chat bot assistant for Expenditure Observers on Compendium on Election Expenditure Monitoring using Open source LLMs. <br> The bot can answer questions in natural language, taking relevant extracts from the ECI document which can be accessed <a href="https://www.eci.gov.in/eci-backend/public/api/download?url=LMAhAK6sOPBp%2FNFF0iRfXbEB1EVSLT41NNLRjYNJJP1KivrUxbfqkDatmHy12e%2Fzk1vx4ptJpQsKYHA87guoLjnPUWtHeZgKtEqs%2FyzfTTYIC0newOHHOjl1rl0u3mJBSIq%2Fi7zDsrcP74v%2FKr8UNw%3D%3D" style="color: #008000; text-decoration: none;">here</a>.</p>""",elem_id='Sub-heading')
|
@@ -128,7 +128,7 @@ with gr.Blocks(theme='Insuz/SimpleIndigo') as demo:
|
|
128 |
)
|
129 |
txt_btn = gr.Button(value="Submit text", scale=1)
|
130 |
|
131 |
-
cross_encoder = gr.Radio(choices=['MiniLM-L6v2','BGE reranker'], value='MiniLM
|
132 |
|
133 |
prompt_html = gr.HTML()
|
134 |
# Turn off interactivity while generating if you click
|
|
|
38 |
#cross_encoder = CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2')
|
39 |
#cross_encoder = CrossEncoder('BAAI/bge-reranker-base')
|
40 |
# Examples
|
41 |
+
examples = ['what is social media and what are rules related to it for expenditure monitoring ,
|
42 |
+
'how many reports to be submitted by Expenditure observer with annexure names ?',
|
43 |
]
|
44 |
|
45 |
|
|
|
103 |
|
104 |
with gr.Blocks(theme='Insuz/SimpleIndigo') as demo:
|
105 |
gr.HTML(value="""<div style="display: flex; align-items: center; justify-content: space-between;">
|
106 |
+
<h1 style="color: #008000">NIRVACHANA - <span style="color: #008000">Expenditure Observer AI Assistant</span></h1>
|
107 |
<img src='logo.png' alt="Chatbot" width="50" height="50" />
|
108 |
</div>""",elem_id='heading')
|
109 |
gr.HTML(value="""<p style="font-family: sans-serif; font-size: 16px;">A free chat bot assistant for Expenditure Observers on Compendium on Election Expenditure Monitoring using Open source LLMs. <br> The bot can answer questions in natural language, taking relevant extracts from the ECI document which can be accessed <a href="https://www.eci.gov.in/eci-backend/public/api/download?url=LMAhAK6sOPBp%2FNFF0iRfXbEB1EVSLT41NNLRjYNJJP1KivrUxbfqkDatmHy12e%2Fzk1vx4ptJpQsKYHA87guoLjnPUWtHeZgKtEqs%2FyzfTTYIC0newOHHOjl1rl0u3mJBSIq%2Fi7zDsrcP74v%2FKr8UNw%3D%3D" style="color: #008000; text-decoration: none;">here</a>.</p>""",elem_id='Sub-heading')
|
|
|
128 |
)
|
129 |
txt_btn = gr.Button(value="Submit text", scale=1)
|
130 |
|
131 |
+
cross_encoder = gr.Radio(choices=['MiniLM-L6v2','BGE reranker'], value='BGE reranker',label="Embeddings", info="Choose MiniLM for Speed, BGE reranker for accuracy")
|
132 |
|
133 |
prompt_html = gr.HTML()
|
134 |
# Turn off interactivity while generating if you click
|