Update app.py
Browse files
app.py
CHANGED
@@ -8,9 +8,9 @@ from secret1 import GOOGLE_API as google_api
|
|
8 |
import PyPDF2
|
9 |
def chatbot_response(user_input, history):
|
10 |
# This is a placeholder function. Replace with your actual chatbot logic.
|
11 |
-
bot_response = "You said: " + user_input
|
12 |
-
history.append((user_input, bot_response))
|
13 |
-
return
|
14 |
|
15 |
def text_splitter_function(text):
|
16 |
text_splitter = CharacterTextSplitter(
|
@@ -64,7 +64,7 @@ with gr.Blocks() as demo:
|
|
64 |
submit_btn=gr.Button("Submit")
|
65 |
# submit_btn.click(text_extract, [input_file], [user_input])
|
66 |
submit_btn.click()
|
67 |
-
send_btn.click(chatbot_response,inputs=[user_input,state],outputs=
|
68 |
|
69 |
if __name__ == "__main__":
|
70 |
embeddings=GooglePalmEmbeddings(google_api_key=google_api)
|
|
|
8 |
import PyPDF2
|
9 |
def chatbot_response(user_input, history):
|
10 |
# This is a placeholder function. Replace with your actual chatbot logic.
|
11 |
+
# bot_response = "You said: " + user_input
|
12 |
+
# history.append((user_input, bot_response))
|
13 |
+
return "hi"
|
14 |
|
15 |
def text_splitter_function(text):
|
16 |
text_splitter = CharacterTextSplitter(
|
|
|
64 |
submit_btn=gr.Button("Submit")
|
65 |
# submit_btn.click(text_extract, [input_file], [user_input])
|
66 |
submit_btn.click()
|
67 |
+
send_btn.click(chatbot_response,inputs=[user_input,state],outputs=[chatbot, state])
|
68 |
|
69 |
if __name__ == "__main__":
|
70 |
embeddings=GooglePalmEmbeddings(google_api_key=google_api)
|