Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -432,7 +432,18 @@ body { background: linear-gradient(to bottom right, #2c3e50, #34495e); color: #e
|
|
432 |
|
433 |
with gr.Blocks(title="AI Research Agent v5.8") as demo:
|
434 |
# Removed gr.HTML("<style>" + custom_css + "</style>") as css is passed to gr.Blocks
|
435 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
436 |
with gr.Column(elem_classes="main-interface-wrapper"): # New overall wrapper for content
|
437 |
with gr.Row(elem_classes="app-title-area"):
|
438 |
gr.Markdown("# 🤖 AI Research Agent")
|
@@ -449,18 +460,7 @@ with gr.Blocks(title="AI Research Agent v5.8") as demo:
|
|
449 |
sqlite_path_display = gr.Textbox(label="SQLite Path", value=f"{MEMORY_SQLITE_PATH}", interactive=False, visible=(MEMORY_STORAGE_BACKEND == "SQLITE"), scale=2) # Use visible
|
450 |
hf_repos_display = gr.Textbox(label="HF Repos", value=f"M: {MEMORY_HF_MEM_REPO}, R: {MEMORY_HF_RULES_REPO}", interactive=False, visible=(MEMORY_STORAGE_BACKEND == "HF_DATASET"), scale=2) # Use visible
|
451 |
|
452 |
-
|
453 |
-
gr.Markdown("## ⚙️ Configuration")
|
454 |
-
with gr.Group():
|
455 |
-
gr.Markdown("### AI Model Settings")
|
456 |
-
api_key_tb = gr.Textbox(label="AI Provider API Key (Override)", type="password", placeholder="Uses .env if blank")
|
457 |
-
prov_sel_dd = gr.Dropdown(label="AI Provider", choices=avail_provs, value=def_prov, interactive=True)
|
458 |
-
model_sel_dd = gr.Dropdown(label="AI Model", choices=def_models, value=def_model_disp, interactive=True)
|
459 |
-
with gr.Group():
|
460 |
-
gr.Markdown("### System Prompt")
|
461 |
-
sys_prompt_tb = gr.Textbox(label="System Prompt Base", lines=10, value=DEFAULT_SYSTEM_PROMPT, interactive=True)
|
462 |
-
if MEMORY_STORAGE_BACKEND == "RAM":
|
463 |
-
save_faiss_sidebar_btn = gr.Button("Save FAISS Indices", variant="secondary")
|
464 |
|
465 |
with gr.Column(scale=3): # Main content area to the right of sidebar
|
466 |
with gr.Tabs():
|
|
|
432 |
|
433 |
with gr.Blocks(title="AI Research Agent v5.8") as demo:
|
434 |
# Removed gr.HTML("<style>" + custom_css + "</style>") as css is passed to gr.Blocks
|
435 |
+
with gr.Sidebar(): # Using Gradio's explicit Sidebar component
|
436 |
+
gr.Markdown("## ⚙️ Configuration")
|
437 |
+
with gr.Group():
|
438 |
+
gr.Markdown("### AI Model Settings")
|
439 |
+
api_key_tb = gr.Textbox(label="AI Provider API Key (Override)", type="password", placeholder="Uses .env if blank")
|
440 |
+
prov_sel_dd = gr.Dropdown(label="AI Provider", choices=avail_provs, value=def_prov, interactive=True)
|
441 |
+
model_sel_dd = gr.Dropdown(label="AI Model", choices=def_models, value=def_model_disp, interactive=True)
|
442 |
+
with gr.Group():
|
443 |
+
gr.Markdown("### System Prompt")
|
444 |
+
sys_prompt_tb = gr.Textbox(label="System Prompt Base", lines=10, value=DEFAULT_SYSTEM_PROMPT, interactive=True)
|
445 |
+
if MEMORY_STORAGE_BACKEND == "RAM":
|
446 |
+
save_faiss_sidebar_btn = gr.Button("Save FAISS Indices", variant="secondary")
|
447 |
with gr.Column(elem_classes="main-interface-wrapper"): # New overall wrapper for content
|
448 |
with gr.Row(elem_classes="app-title-area"):
|
449 |
gr.Markdown("# 🤖 AI Research Agent")
|
|
|
460 |
sqlite_path_display = gr.Textbox(label="SQLite Path", value=f"{MEMORY_SQLITE_PATH}", interactive=False, visible=(MEMORY_STORAGE_BACKEND == "SQLITE"), scale=2) # Use visible
|
461 |
hf_repos_display = gr.Textbox(label="HF Repos", value=f"M: {MEMORY_HF_MEM_REPO}, R: {MEMORY_HF_RULES_REPO}", interactive=False, visible=(MEMORY_STORAGE_BACKEND == "HF_DATASET"), scale=2) # Use visible
|
462 |
|
463 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
464 |
|
465 |
with gr.Column(scale=3): # Main content area to the right of sidebar
|
466 |
with gr.Tabs():
|