z00mP commited on
Commit
8663794
1 Parent(s): 9f3ddbf

rename parameter

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -34,7 +34,7 @@ def add_text(history, text):
34
  return history, gr.Textbox(value="", interactive=False)
35
 
36
 
37
- def bot(history, api_kind, chunk_table, embedding_model, llm_model, eross_encoder, top_k_param):
38
  top_k_param = int(top_k_param)
39
  query = history[-1][0]
40
 
@@ -119,7 +119,7 @@ with gr.Blocks() as demo:
119
  value="gpt-3.5-turbo",
120
  label='LLM'
121
  )
122
- eross_encoder = gr.Radio(
123
  choices=[
124
  "None"
125
  "BAAI/bge-reranker-large",
@@ -143,14 +143,14 @@ with gr.Blocks() as demo:
143
  prompt_html = gr.HTML()
144
  # Turn off interactivity while generating if you click
145
  txt_msg = txt_btn.click(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
146
- bot, [chatbot, api_kind, chunk_table, embedding_model, llm_model, eross_encoder, top_k_param], [chatbot, prompt_html])
147
 
148
  # Turn it back on
149
  txt_msg.then(lambda: gr.Textbox(interactive=True), None, [txt], queue=False)
150
 
151
  # Turn off interactivity while generating if you hit enter
152
  txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
153
- bot, [chatbot, api_kind, chunk_table, embedding_model, llm_model, eross_encoder, top_k_param], [chatbot, prompt_html])
154
 
155
  # Turn it back on
156
  txt_msg.then(lambda: gr.Textbox(interactive=True), None, [txt], queue=False)
 
34
  return history, gr.Textbox(value="", interactive=False)
35
 
36
 
37
+ def bot(history, api_kind, chunk_table, embedding_model, llm_model, cross_encoder, top_k_param):
38
  top_k_param = int(top_k_param)
39
  query = history[-1][0]
40
 
 
119
  value="gpt-3.5-turbo",
120
  label='LLM'
121
  )
122
+ cross_encoder = gr.Radio(
123
  choices=[
124
  "None"
125
  "BAAI/bge-reranker-large",
 
143
  prompt_html = gr.HTML()
144
  # Turn off interactivity while generating if you click
145
  txt_msg = txt_btn.click(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
146
+ bot, [chatbot, api_kind, chunk_table, embedding_model, llm_model, cross_encoder, top_k_param], [chatbot, prompt_html])
147
 
148
  # Turn it back on
149
  txt_msg.then(lambda: gr.Textbox(interactive=True), None, [txt], queue=False)
150
 
151
  # Turn off interactivity while generating if you hit enter
152
  txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
153
+ bot, [chatbot, api_kind, chunk_table, embedding_model, llm_model, cross_encoder, top_k_param], [chatbot, prompt_html])
154
 
155
  # Turn it back on
156
  txt_msg.then(lambda: gr.Textbox(interactive=True), None, [txt], queue=False)