Update app.py
Browse fileshttps://visitor-badge.glitch.me/badge?page_id=jwenjian.visitor-badge
app.py
CHANGED
@@ -109,12 +109,12 @@ def get_chain(vectorstore):
|
|
109 |
callbacks=[StdOutCallbackHandler()],
|
110 |
verbose=True,
|
111 |
temperature=0,
|
112 |
-
model_name='gpt-4
|
113 |
|
114 |
question_generator = LLMChain(llm=llm, prompt=CONDENSE_QUESTION_PROMPT)
|
115 |
doc_chain = load_qa_chain(llm=llm,chain_type="stuff",prompt=load_prompt())
|
116 |
|
117 |
-
chain = ConversationalRetrievalChain(retriever=vectorstore.as_retriever(search_kwags={"k":
|
118 |
question_generator=question_generator,
|
119 |
combine_docs_chain=doc_chain,
|
120 |
memory=memory,
|
@@ -156,7 +156,7 @@ block = gr.Blocks(css=".gradio-container {background-color: lightgray}")
|
|
156 |
with block:
|
157 |
with gr.Row():
|
158 |
gr.Markdown("<h3><center>Chat-Your-Data (Investor Education)</center></h3>")
|
159 |
-
embed_but = gr.Button(value='Load QA
|
160 |
with gr.Row():
|
161 |
websites = gr.Radio(choices=site_options_list,value=site_options_list[0],label='Select US or AUS website data',
|
162 |
interactive=True)
|
@@ -205,6 +205,6 @@ with block:
|
|
205 |
outputs=[agent_state],
|
206 |
)
|
207 |
|
208 |
-
gr.Markdown("![
|
209 |
|
210 |
block.launch(debug=True)
|
|
|
109 |
callbacks=[StdOutCallbackHandler()],
|
110 |
verbose=True,
|
111 |
temperature=0,
|
112 |
+
model_name='gpt-4')
|
113 |
|
114 |
question_generator = LLMChain(llm=llm, prompt=CONDENSE_QUESTION_PROMPT)
|
115 |
doc_chain = load_qa_chain(llm=llm,chain_type="stuff",prompt=load_prompt())
|
116 |
|
117 |
+
chain = ConversationalRetrievalChain(retriever=vectorstore.as_retriever(search_kwags={"k": 4}),
|
118 |
question_generator=question_generator,
|
119 |
combine_docs_chain=doc_chain,
|
120 |
memory=memory,
|
|
|
156 |
with block:
|
157 |
with gr.Row():
|
158 |
gr.Markdown("<h3><center>Chat-Your-Data (Investor Education)</center></h3>")
|
159 |
+
embed_but = gr.Button(value='Step 1: Click Me to Load the QA System')
|
160 |
with gr.Row():
|
161 |
websites = gr.Radio(choices=site_options_list,value=site_options_list[0],label='Select US or AUS website data',
|
162 |
interactive=True)
|
|
|
205 |
outputs=[agent_state],
|
206 |
)
|
207 |
|
208 |
+
gr.Markdown("")
|
209 |
|
210 |
block.launch(debug=True)
|