Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from langchain.llms import GooglePalm
|
|
8 |
# Define chatbot response function
|
9 |
def chatbot_response(user_input):
|
10 |
# Example: returning a placeholder response, update with actual chatbot logic
|
11 |
-
|
12 |
# history.append((user_input, bot_response))
|
13 |
return "hii"
|
14 |
|
@@ -59,7 +59,7 @@ with gr.Blocks() as demo:
|
|
59 |
# submit_btn.click(text_extract, inputs=[input_file], outputs=[user_input])
|
60 |
|
61 |
# Connect send button to chatbot_response function
|
62 |
-
send_btn.click(chatbot_response, inputs=[user_input], outputs=chatbot)
|
63 |
|
64 |
# Initialize embeddings and launch the app
|
65 |
if __name__ == "__main__":
|
|
|
8 |
# Define chatbot response function
|
9 |
def chatbot_response(user_input):
|
10 |
# Example: returning a placeholder response, update with actual chatbot logic
|
11 |
+
bot_response = "You said: " + user_input
|
12 |
# history.append((user_input, bot_response))
|
13 |
return "hii"
|
14 |
|
|
|
59 |
# submit_btn.click(text_extract, inputs=[input_file], outputs=[user_input])
|
60 |
|
61 |
# Connect send button to chatbot_response function
|
62 |
+
send_btn.click(chatbot_response, inputs=[user_input,state], outputs=[chatbot,state])
|
63 |
|
64 |
# Initialize embeddings and launch the app
|
65 |
if __name__ == "__main__":
|