Skip to content

Commit

Permalink
Personal/xi/nl2sql UI (#196)
Browse files Browse the repository at this point in the history
* change insert to be sync

* add nl2sql

* nl2sql setting

* nl2sql setting

* fix test bug

* fix bugs

* data analysis retriever and synthesizer

* fix tests bugs

* add data_analysis ui

* update poetry.lock

* remove unnecessary comment

* add fault tolerance if no file provided

* add minor fault tolerance

* add upload_datasheet

* nl2sql refactor and add db ui

* restore retriever & synthesizer

* update poetry.lock

* Fix list merge

* bug fix

* add default display

* data_analysis ui update

---------

Co-authored-by: 陆逊 <[email protected]>
  • Loading branch information
aero-xi and moria97 authored Sep 5, 2024
1 parent 90c4301 commit 6c399b2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/pai_rag/app/web/tabs/data_analysis_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,14 @@ def reset_textbox():
def create_data_analysis_tab() -> Dict[str, Any]:
with gr.Row():
with gr.Column(scale=4):
data_analysis_type = gr.Dropdown(
data_analysis_type = gr.Radio(
choices=[
"database",
"datafile",
"database",
],
value="datafile",
label="Please choose data analysis type",
elem_id="data_analysis_type",
interactive=DEFAULT_IS_INTERACTIVE.lower() != "false",
)

# datafile
Expand Down Expand Up @@ -159,8 +158,11 @@ def create_data_analysis_tab() -> Dict[str, Any]:
)

connect_db_button = gr.Button(
"Connect Database"
) # 点击功能中增加retriever type的选择(如果连接成功的话)
"Connect Database",
elem_id="connect_db_button",
variant="primary",
) # 点击功能中更新analysis_type

connection_info = gr.Textbox(
label="Connection Info", elem_id="db_connection_info"
)
Expand Down

0 comments on commit 6c399b2

Please sign in to comment.