Mattral commited on
Commit
d16e462
β€’
1 Parent(s): 92bb102

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,7 +7,7 @@ from langchain.text_splitter import RecursiveCharacterTextSplitter
7
  from langchain.callbacks.manager import CallbackManager
8
  from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
9
  from langchain.vectorstores import Qdrant
10
- from ctransformers import AutoModelForCausalLM
11
 
12
  # Load the embedding model
13
  encoder = SentenceTransformer('jinaai/jina-embedding-b-en-v1')
@@ -82,7 +82,7 @@ def chat(messages):
82
 
83
  screen = gr.Interface(
84
  fn=chat,
85
- inputs=gr.Chatbot(allow_flagging="never", placeholder="Type your question here..."),
86
  outputs="chatbot",
87
  title="Q&A with PDFs πŸ‘©πŸ»β€πŸ’»πŸ““βœπŸ»πŸ’‘",
88
  description="This app facilitates a conversation with PDFs uploadedπŸ’‘",
@@ -93,4 +93,4 @@ screen = gr.Interface(
93
  )
94
 
95
  # Add a way to upload and setup the database before starting the chat
96
- screen.launch()
 
7
  from langchain.callbacks.manager import CallbackManager
8
  from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
9
  from langchain.vectorstores import Qdrant
10
+ from transformers import AutoModelForCausalLM
11
 
12
  # Load the embedding model
13
  encoder = SentenceTransformer('jinaai/jina-embedding-b-en-v1')
 
82
 
83
  screen = gr.Interface(
84
  fn=chat,
85
+ inputs=gr.Textbox(placeholder="Type your question here..."),
86
  outputs="chatbot",
87
  title="Q&A with PDFs πŸ‘©πŸ»β€πŸ’»πŸ““βœπŸ»πŸ’‘",
88
  description="This app facilitates a conversation with PDFs uploadedπŸ’‘",
 
93
  )
94
 
95
  # Add a way to upload and setup the database before starting the chat
96
+ screen.launch()