Spaces:
Paused
Paused
Commit
Β·
b52fa32
1
Parent(s):
7fd9da3
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,46 +19,6 @@ with gr.Blocks(css="") as demo:
|
|
| 19 |
chat_context = gr.State([])
|
| 20 |
new_google_chat_context = gr.State([])
|
| 21 |
|
| 22 |
-
with gr.Row():
|
| 23 |
-
with gr.Column(scale=3):
|
| 24 |
-
with gr.Box():
|
| 25 |
-
gr.Markdown("**Indicies**")
|
| 26 |
-
with gr.Row():
|
| 27 |
-
with gr.Column(scale=12):
|
| 28 |
-
index_select = gr.Dropdown(choices=refresh_json_list(plain=True), value="index", show_label=False, multiselect=False).style(container=False)
|
| 29 |
-
with gr.Column(min_width=30, scale=1):
|
| 30 |
-
index_refresh_btn = gr.Button("π").style()
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
with gr.Tab("Search"):
|
| 34 |
-
with gr.Row():
|
| 35 |
-
with gr.Column(scale=1):
|
| 36 |
-
chat_tone = gr.Radio(["smart", "concise", "creative"], label="chat_tone", type="index", value="concise")
|
| 37 |
-
with gr.Column(scale=3):
|
| 38 |
-
search_options_checkbox = gr.CheckboxGroup(label="Your API Here", choices=["π Google", "π‘ Porch"])
|
| 39 |
-
chatbot = gr.Chatbot()
|
| 40 |
-
with gr.Row():
|
| 41 |
-
with gr.Column(min_width=50, scale=1):
|
| 42 |
-
chat_empty_btn = gr.Button("π§Ή", variant="secondary")
|
| 43 |
-
with gr.Column(scale=12):
|
| 44 |
-
chat_input = gr.Textbox(show_label=False, placeholder="Enter text...").style(container=False)
|
| 45 |
-
with gr.Column(min_width=50, scale=1):
|
| 46 |
-
chat_submit_btn = gr.Button("π", variant="primary")
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
with gr.Tab("Setting"):
|
| 50 |
-
with gr.Row():
|
| 51 |
-
sim_k = gr.Slider(1, 10, 3, step=1, label="similarity_topk", interactive=True, show_label=True)
|
| 52 |
-
tempurature = gr.Slider(0, 2, 0.5, step=0.1, label="tempurature", interactive=True, show_label=True)
|
| 53 |
-
with gr.Row():
|
| 54 |
-
with gr.Column():
|
| 55 |
-
tmpl_select = gr.Radio(list(prompt_tmpl_dict.keys()), value="Default", label="Prompt", interactive=True)
|
| 56 |
-
prompt_tmpl = gr.Textbox(value=prompt_tmpl_dict["Default"] ,lines=10, max_lines=40 ,show_label=False)
|
| 57 |
-
with gr.Column():
|
| 58 |
-
refine_select = gr.Radio(list(refine_tmpl_dict.keys()), value="Default", label="Refine", interactive=True)
|
| 59 |
-
refine_tmpl = gr.Textbox(value=refine_tmpl_dict["Default"] ,lines=10, max_lines=40 ,show_label=False)
|
| 60 |
-
|
| 61 |
-
|
| 62 |
with gr.Tab("Upload"):
|
| 63 |
with gr.Row():
|
| 64 |
with gr.Column():
|
|
|
|
| 19 |
chat_context = gr.State([])
|
| 20 |
new_google_chat_context = gr.State([])
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
with gr.Tab("Upload"):
|
| 23 |
with gr.Row():
|
| 24 |
with gr.Column():
|