Update app.py
Browse files
app.py
CHANGED
@@ -177,7 +177,7 @@ additional_inputs = [
|
|
177 |
|
178 |
|
179 |
# Create the Gradio interface
|
180 |
-
with gr.Blocks(theme=gr.themes.Default()
|
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=
|
260 |
-
inputs=[msg,
|
261 |
-
outputs=[chatbot, relevant_info_textbox
|
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=
|
268 |
-
inputs=[msg,
|
269 |
-
outputs=[chatbot, relevant_info_textbox
|
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 |
|