Spaces:
Runtime error
Runtime error
Leonardo
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -379,15 +379,9 @@ class GradioUI:
|
|
| 379 |
if device == "Desktop":
|
| 380 |
with gr.Blocks(fill_height=True,) as sidebar_demo:
|
| 381 |
with gr.Sidebar():
|
| 382 |
-
gr.Markdown("""#
|
| 383 |
-
|
| 384 |
-
OpenAI just published [Deep Research](https://openai.com/index/introducing-deep-research/), a very nice assistant that can perform deep searches on the web to answer user questions.
|
| 385 |
-
|
| 386 |
-
However, their agent has a huge downside: it's not open. So we've started a 24-hour rush to replicate and open-source it. Our resulting [open-Deep-Research agent](https://github.com/huggingface/smolagents/tree/main/examples/open_deep_research) took the #1 rank of any open submission on the GAIA leaderboard! ✨
|
| 387 |
-
|
| 388 |
-
You can try a simplified version here (uses `Qwen-Coder-32B` instead of `o1`, so much less powerful than the original open-Deep-Research).<br><br>""")
|
| 389 |
with gr.Group():
|
| 390 |
-
gr.Markdown("**
|
| 391 |
text_input = gr.Textbox(lines=3, label="Your request", container=False, placeholder="Enter your prompt here and press Shift+Enter or press the button")
|
| 392 |
launch_research_btn = gr.Button("Run", variant="primary")
|
| 393 |
|
|
@@ -450,14 +444,7 @@ class GradioUI:
|
|
| 450 |
# Render simple layout
|
| 451 |
else:
|
| 452 |
with gr.Blocks(fill_height=True,) as simple_demo:
|
| 453 |
-
gr.Markdown("""#
|
| 454 |
-
_Built with [smolagents](https://github.com/huggingface/smolagents)_
|
| 455 |
-
|
| 456 |
-
OpenAI just published [Deep Research](https://openai.com/index/introducing-deep-research/), a very nice assistant that can perform deep searches on the web to answer user questions.
|
| 457 |
-
|
| 458 |
-
However, their agent has a huge downside: it's not open. So we've started a 24-hour rush to replicate and open-source it. Our resulting [open-Deep-Research agent](https://github.com/huggingface/smolagents/tree/main/examples/open_deep_research) took the #1 rank of any open submission on the GAIA leaderboard! ✨
|
| 459 |
-
|
| 460 |
-
You can try a simplified version below (uses `Qwen-Coder-32B` instead of `o1`, so much less powerful than the original open-Deep-Research)👇""")
|
| 461 |
# Add session state to store session-specific data
|
| 462 |
session_state = gr.State({}) # Initialize empty state for each session
|
| 463 |
stored_messages = gr.State([])
|
|
@@ -481,7 +468,7 @@ class GradioUI:
|
|
| 481 |
[upload_file, file_uploads_log],
|
| 482 |
[upload_status, file_uploads_log],
|
| 483 |
)
|
| 484 |
-
text_input = gr.Textbox(lines=1, label="
|
| 485 |
launch_research_btn = gr.Button("Run", variant="primary",)
|
| 486 |
|
| 487 |
text_input.submit(
|
|
@@ -492,7 +479,7 @@ class GradioUI:
|
|
| 492 |
# Include session_state in function calls
|
| 493 |
[stored_messages, chatbot, session_state],
|
| 494 |
[chatbot]
|
| 495 |
-
).then(lambda : (gr.Textbox(interactive=True, placeholder="
|
| 496 |
None,
|
| 497 |
[text_input, launch_research_btn])
|
| 498 |
launch_research_btn.click(
|
|
@@ -503,7 +490,7 @@ class GradioUI:
|
|
| 503 |
# Include session_state in function calls
|
| 504 |
[stored_messages, chatbot, session_state],
|
| 505 |
[chatbot]
|
| 506 |
-
).then(lambda : (gr.Textbox(interactive=True, placeholder="
|
| 507 |
None,
|
| 508 |
[text_input, launch_research_btn])
|
| 509 |
|
|
|
|
| 379 |
if device == "Desktop":
|
| 380 |
with gr.Blocks(fill_height=True,) as sidebar_demo:
|
| 381 |
with gr.Sidebar():
|
| 382 |
+
gr.Markdown("""#OpenDeepResearch - free the AI agents!""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 383 |
with gr.Group():
|
| 384 |
+
gr.Markdown("**What's on your mind mate?**", container=True)
|
| 385 |
text_input = gr.Textbox(lines=3, label="Your request", container=False, placeholder="Enter your prompt here and press Shift+Enter or press the button")
|
| 386 |
launch_research_btn = gr.Button("Run", variant="primary")
|
| 387 |
|
|
|
|
| 444 |
# Render simple layout
|
| 445 |
else:
|
| 446 |
with gr.Blocks(fill_height=True,) as simple_demo:
|
| 447 |
+
gr.Markdown("""#OpenDeepResearch - free the AI agents!""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 448 |
# Add session state to store session-specific data
|
| 449 |
session_state = gr.State({}) # Initialize empty state for each session
|
| 450 |
stored_messages = gr.State([])
|
|
|
|
| 468 |
[upload_file, file_uploads_log],
|
| 469 |
[upload_status, file_uploads_log],
|
| 470 |
)
|
| 471 |
+
text_input = gr.Textbox(lines=1, label="What's on your mind mate?", placeholder="Chuck in a question and we'll take care of the rest")
|
| 472 |
launch_research_btn = gr.Button("Run", variant="primary",)
|
| 473 |
|
| 474 |
text_input.submit(
|
|
|
|
| 479 |
# Include session_state in function calls
|
| 480 |
[stored_messages, chatbot, session_state],
|
| 481 |
[chatbot]
|
| 482 |
+
).then(lambda : (gr.Textbox(interactive=True, placeholder="Chuck in a question and we'll take care of the rest"), gr.Button(interactive=True)),
|
| 483 |
None,
|
| 484 |
[text_input, launch_research_btn])
|
| 485 |
launch_research_btn.click(
|
|
|
|
| 490 |
# Include session_state in function calls
|
| 491 |
[stored_messages, chatbot, session_state],
|
| 492 |
[chatbot]
|
| 493 |
+
).then(lambda : (gr.Textbox(interactive=True, placeholder="Chuck in a question and we'll take care of the rest"), gr.Button(interactive=True)),
|
| 494 |
None,
|
| 495 |
[text_input, launch_research_btn])
|
| 496 |
|