Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -134,7 +134,7 @@ def bot(history, cross_encoder):
|
|
| 134 |
history[-1][1] = character
|
| 135 |
print('Final history is ',history)
|
| 136 |
yield history, prompt_html
|
| 137 |
-
store_message(db,history[-1][0],history[-1][1],cross_encoder)
|
| 138 |
else:
|
| 139 |
# Retrieve documents relevant to query
|
| 140 |
document_start = perf_counter()
|
|
@@ -177,7 +177,7 @@ def bot(history, cross_encoder):
|
|
| 177 |
history[-1][1] = character
|
| 178 |
print('Final history is ',history)
|
| 179 |
yield history, prompt_html
|
| 180 |
-
store_message(db,history[-1][0],history[-1][1],cross_encoder)
|
| 181 |
|
| 182 |
|
| 183 |
with gr.Blocks(theme='Insuz/SimpleIndigo') as demo:
|
|
@@ -190,7 +190,7 @@ with gr.Blocks(theme='Insuz/SimpleIndigo') as demo:
|
|
| 190 |
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: #00008B; text-decoration: none;">CLICK HERE !</a>.
|
| 191 |
</p>
|
| 192 |
""", elem_id='Sub-heading')
|
| 193 |
-
usage_count = get_and_increment_value_count(db,collection_name, field_name)
|
| 194 |
gr.HTML(value=f"""<p style="font-family: Arial, sans-serif; font-size: 16px;">Developed by K M Ramyasri , PGT . Suggestions may be sent to <a href="mailto:[email protected]" style="color: #00008B; font-style: italic;">[email protected]</a>.</p>""", elem_id='Sub-heading1 ')
|
| 195 |
count_html = gr.HTML(value=f"""
|
| 196 |
<div style="display: flex; justify-content: flex-end;">
|
|
|
|
| 134 |
history[-1][1] = character
|
| 135 |
print('Final history is ',history)
|
| 136 |
yield history, prompt_html
|
| 137 |
+
#store_message(db,history[-1][0],history[-1][1],cross_encoder)
|
| 138 |
else:
|
| 139 |
# Retrieve documents relevant to query
|
| 140 |
document_start = perf_counter()
|
|
|
|
| 177 |
history[-1][1] = character
|
| 178 |
print('Final history is ',history)
|
| 179 |
yield history, prompt_html
|
| 180 |
+
#store_message(db,history[-1][0],history[-1][1],cross_encoder)
|
| 181 |
|
| 182 |
|
| 183 |
with gr.Blocks(theme='Insuz/SimpleIndigo') as demo:
|
|
|
|
| 190 |
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: #00008B; text-decoration: none;">CLICK HERE !</a>.
|
| 191 |
</p>
|
| 192 |
""", elem_id='Sub-heading')
|
| 193 |
+
#usage_count = get_and_increment_value_count(db,collection_name, field_name)
|
| 194 |
gr.HTML(value=f"""<p style="font-family: Arial, sans-serif; font-size: 16px;">Developed by K M Ramyasri , PGT . Suggestions may be sent to <a href="mailto:[email protected]" style="color: #00008B; font-style: italic;">[email protected]</a>.</p>""", elem_id='Sub-heading1 ')
|
| 195 |
count_html = gr.HTML(value=f"""
|
| 196 |
<div style="display: flex; justify-content: flex-end;">
|