Spaces:
Runtime error
Runtime error
NCTCMumbai
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -87,7 +87,7 @@ def update_count_html():
|
|
87 |
def store_message(db,query,answer,cross_encoder):
|
88 |
timestamp = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
89 |
# Create a new document reference with a dynamic document name based on timestamp
|
90 |
-
|
91 |
new_completion.set({
|
92 |
'query': query,
|
93 |
'answer':answer,
|
@@ -218,7 +218,7 @@ with gr.Blocks(theme='Insuz/SimpleIndigo') as demo:
|
|
218 |
)
|
219 |
txt_btn = gr.Button(value="Submit text", scale=1)
|
220 |
|
221 |
-
cross_encoder = gr.Radio(choices=['MiniLM-L6v2','BGE reranker','ColBERT'], value='
|
222 |
|
223 |
prompt_html = gr.HTML()
|
224 |
# Turn off interactivity while generating if you click
|
|
|
87 |
def store_message(db,query,answer,cross_encoder):
|
88 |
timestamp = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
89 |
# Create a new document reference with a dynamic document name based on timestamp
|
90 |
+
new_completion= db.collection('Nirvachana').document(f"chatlogs_{timestamp}")
|
91 |
new_completion.set({
|
92 |
'query': query,
|
93 |
'answer':answer,
|
|
|
218 |
)
|
219 |
txt_btn = gr.Button(value="Submit text", scale=1)
|
220 |
|
221 |
+
cross_encoder = gr.Radio(choices=['MiniLM-L6v2','BGE reranker','ColBERT'], value='BGE reranker',label="Embeddings", info="Choose MiniLM for Speed, BGE reranker for accuracy,ColBERT for both (First query to Colbert may take litte time)")
|
222 |
|
223 |
prompt_html = gr.HTML()
|
224 |
# Turn off interactivity while generating if you click
|