Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -476,6 +476,15 @@ def display_documents():
|
|
476 |
label="Select documents to query"
|
477 |
)
|
478 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
479 |
# Define the checkbox outside the demo block
|
480 |
document_selector = gr.CheckboxGroup(label="Select documents to query")
|
481 |
|
@@ -526,6 +535,7 @@ demo = gr.ChatInterface(
|
|
526 |
likeable=True,
|
527 |
layout="bubble",
|
528 |
height=400,
|
|
|
529 |
)
|
530 |
)
|
531 |
|
|
|
476 |
label="Select documents to query"
|
477 |
)
|
478 |
|
479 |
+
def initial_conversation():
|
480 |
+
return [
|
481 |
+
(None, "Welcome! I'm your AI assistant for web search and PDF analysis. Here's how you can use me:\n\n"
|
482 |
+
"1. Set the toggle for Web Search and PDF Search from the checkbox in Additional Inputs drop down window\n"
|
483 |
+
"2. Use web search to find information\n"
|
484 |
+
"3. Ask questions about uploaded PDF documents\n"
|
485 |
+
"To get started, upload some PDFs or ask me a question!")
|
486 |
+
]
|
487 |
+
|
488 |
# Define the checkbox outside the demo block
|
489 |
document_selector = gr.CheckboxGroup(label="Select documents to query")
|
490 |
|
|
|
535 |
likeable=True,
|
536 |
layout="bubble",
|
537 |
height=400,
|
538 |
+
value=initial_conversation()
|
539 |
)
|
540 |
)
|
541 |
|