Merge remote-tracking branch 'origin/main'
Browse files- Langchain_demo.ipynb +0 -0
- app.py +3 -0
- data/ks_source/.gitattributes +0 -1
Langchain_demo.ipynb
ADDED
The diff for this file is too large to render.
See raw diff
|
|
app.py
CHANGED
@@ -17,6 +17,7 @@ import gradio as gr
|
|
17 |
|
18 |
from langchain import PromptTemplate
|
19 |
from langchain.agents import Tool
|
|
|
20 |
from langchain.agents import initialize_agent
|
21 |
|
22 |
from langchain.agents import AgentType
|
@@ -768,12 +769,14 @@ def gradio_run():
|
|
768 |
已經讀取所有提供的csv 資料, 可以詢問資料任何問題(Talk to data)
|
769 |
建議先詢問欄位後, 後續再構思其他問題
|
770 |
""")
|
|
|
771 |
invField = gr.Textbox(visible=False)
|
772 |
dir_path = f"{root_file_path}{believe_source_path}/*.csv"
|
773 |
res = glob.glob(dir_path)
|
774 |
gr.Examples(res, label="資料庫檔案", inputs=invField, examples_per_page=4)
|
775 |
with gr.Row():
|
776 |
with gr.Column():
|
|
|
777 |
tmp_chatbot = gr.Chatbot(value=[], elem_id="tmp_chatbot").style(height=500)
|
778 |
with gr.Row():
|
779 |
with gr.Column(scale=5):
|
|
|
17 |
|
18 |
from langchain import PromptTemplate
|
19 |
from langchain.agents import Tool
|
20 |
+
from langchain.agents import load_tools
|
21 |
from langchain.agents import initialize_agent
|
22 |
|
23 |
from langchain.agents import AgentType
|
|
|
769 |
已經讀取所有提供的csv 資料, 可以詢問資料任何問題(Talk to data)
|
770 |
建議先詢問欄位後, 後續再構思其他問題
|
771 |
""")
|
772 |
+
|
773 |
invField = gr.Textbox(visible=False)
|
774 |
dir_path = f"{root_file_path}{believe_source_path}/*.csv"
|
775 |
res = glob.glob(dir_path)
|
776 |
gr.Examples(res, label="資料庫檔案", inputs=invField, examples_per_page=4)
|
777 |
with gr.Row():
|
778 |
with gr.Column():
|
779 |
+
|
780 |
tmp_chatbot = gr.Chatbot(value=[], elem_id="tmp_chatbot").style(height=500)
|
781 |
with gr.Row():
|
782 |
with gr.Column(scale=5):
|
data/ks_source/.gitattributes
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
*.csv filter=lfs diff=lfs merge=lfs -text
|
|
|
|