jchen8000 commited on
Commit
e1a6a5c
·
verified ·
1 Parent(s): cffdd6e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -177,7 +177,7 @@ additional_inputs = [
177
 
178
 
179
  # Create the Gradio interface
180
- with gr.Blocks(theme=gr.themes.Default(), css=chatbot_css) as demo:
181
  with gr.Tab("Indexing"):
182
  gr.Markdown(desc)
183
  # pdf_input = gr.File(label="Upload PDF", file_types=[".pdf"])
@@ -256,17 +256,17 @@ with gr.Blocks(theme=gr.themes.Default(), css=chatbot_css) as demo:
256
 
257
  # Bind the `process_chat_and_info` function to the submit event of the message textbox
258
  msg.submit(
259
- fn=process_chat_and_info,
260
- inputs=[msg, chatbot, model_name_textbox, temperature_slider, max_tokens_slider, top_p_slider, seed_number],
261
- outputs=[chatbot, relevant_info_textbox, msg], # Order matters here: chatbot, relevant_info, then msg
262
  queue=False # Set to True if you expect heavy load
263
  )
264
 
265
  # Bind the `process_chat_and_info` function to the click event of the send button
266
  submit_btn.click(
267
- fn=process_chat_and_info,
268
- inputs=[msg, chatbot, model_name_textbox, temperature_slider, max_tokens_slider, top_p_slider, seed_number],
269
- outputs=[chatbot, relevant_info_textbox, msg], # Order matters here
270
  queue=False # Set to True if you expect heavy load
271
  )
272
 
 
177
 
178
 
179
  # Create the Gradio interface
180
+ with gr.Blocks(theme=gr.themes.Default() ) as demo:
181
  with gr.Tab("Indexing"):
182
  gr.Markdown(desc)
183
  # pdf_input = gr.File(label="Upload PDF", file_types=[".pdf"])
 
256
 
257
  # Bind the `process_chat_and_info` function to the submit event of the message textbox
258
  msg.submit(
259
+ fn=generate_response,
260
+ inputs=[msg, None, model_name_textbox, temperature_slider, max_tokens_slider, top_p_slider, seed_number],
261
+ outputs=[chatbot, relevant_info_textbox], # Order matters here: chatbot, relevant_info, then msg
262
  queue=False # Set to True if you expect heavy load
263
  )
264
 
265
  # Bind the `process_chat_and_info` function to the click event of the send button
266
  submit_btn.click(
267
+ fn=generate_response,
268
+ inputs=[msg, None, model_name_textbox, temperature_slider, max_tokens_slider, top_p_slider, seed_number],
269
+ outputs=[chatbot, relevant_info_textbox], # Order matters here
270
  queue=False # Set to True if you expect heavy load
271
  )
272