fixed ui
Browse files
app.py
CHANGED
|
@@ -408,10 +408,10 @@ with gr.Blocks(title="AI Ally (Gradio) — Crawl4AI + OpenRouter + FAISS") as de
|
|
| 408 |
upload_btn.click(upload_and_index, inputs=[file_input], outputs=[upload_status, preview_box])
|
| 409 |
|
| 410 |
gr.Markdown("### Ask about the indexed documents")
|
| 411 |
-
q = gr.Textbox(label="Question", lines=
|
| 412 |
-
sys_prompt = gr.Textbox(label="Optional System Prompt (sent to LLM)", lines=
|
| 413 |
ask_btn = gr.Button("Ask")
|
| 414 |
-
answer_out = gr.Textbox(label="Answer JSON", interactive=False)
|
| 415 |
ask_btn.click(ask_question, inputs=[q, sys_prompt], outputs=[answer_out])
|
| 416 |
|
| 417 |
with gr.Tab("Website Crawl"):
|
|
@@ -424,10 +424,10 @@ with gr.Blocks(title="AI Ally (Gradio) — Crawl4AI + OpenRouter + FAISS") as de
|
|
| 424 |
crawl_btn.click(crawl_and_index, inputs=[url], outputs=[crawl_status, crawl_preview])
|
| 425 |
|
| 426 |
gr.Markdown("### Ask about the crawled site")
|
| 427 |
-
q2 = gr.Textbox(label="Question", lines=
|
| 428 |
-
sys_prompt2 = gr.Textbox(label="Optional System Prompt (sent to LLM)", lines=
|
| 429 |
ask_btn2 = gr.Button("Ask site")
|
| 430 |
-
answer_out2 = gr.Textbox(label="Answer JSON", interactive=False)
|
| 431 |
ask_btn2.click(ask_question, inputs=[q2, sys_prompt2], outputs=[answer_out2])
|
| 432 |
|
| 433 |
with gr.Tab("Settings / Info"):
|
|
|
|
| 408 |
upload_btn.click(upload_and_index, inputs=[file_input], outputs=[upload_status, preview_box])
|
| 409 |
|
| 410 |
gr.Markdown("### Ask about the indexed documents")
|
| 411 |
+
q = gr.Textbox(label="Question", lines=10)
|
| 412 |
+
sys_prompt = gr.Textbox(label="Optional System Prompt (sent to LLM)", lines=10, value="You are a helpful assistant.")
|
| 413 |
ask_btn = gr.Button("Ask")
|
| 414 |
+
answer_out = gr.Textbox(label="Answer JSON", interactive=False, lines=15)
|
| 415 |
ask_btn.click(ask_question, inputs=[q, sys_prompt], outputs=[answer_out])
|
| 416 |
|
| 417 |
with gr.Tab("Website Crawl"):
|
|
|
|
| 424 |
crawl_btn.click(crawl_and_index, inputs=[url], outputs=[crawl_status, crawl_preview])
|
| 425 |
|
| 426 |
gr.Markdown("### Ask about the crawled site")
|
| 427 |
+
q2 = gr.Textbox(label="Question", lines=10)
|
| 428 |
+
sys_prompt2 = gr.Textbox(label="Optional System Prompt (sent to LLM)", lines=10, value="You are a helpful assistant.")
|
| 429 |
ask_btn2 = gr.Button("Ask site")
|
| 430 |
+
answer_out2 = gr.Textbox(label="Answer JSON", interactive=False, lines=15)
|
| 431 |
ask_btn2.click(ask_question, inputs=[q2, sys_prompt2], outputs=[answer_out2])
|
| 432 |
|
| 433 |
with gr.Tab("Settings / Info"):
|