Spaces:
Sleeping
Sleeping
Update Gradio_UI.py
Browse files- Gradio_UI.py +4 -1
Gradio_UI.py
CHANGED
@@ -24,6 +24,8 @@ from smolagents.agents import ActionStep, MultiStepAgent
|
|
24 |
from smolagents.memory import MemoryStep
|
25 |
from smolagents.utils import _is_package_available
|
26 |
|
|
|
|
|
27 |
|
28 |
def pull_messages_from_step(
|
29 |
step_log: MemoryStep,
|
@@ -262,6 +264,7 @@ class GradioUI:
|
|
262 |
import gradio as gr
|
263 |
|
264 |
with gr.Blocks(fill_height=True) as demo:
|
|
|
265 |
stored_messages = gr.State([])
|
266 |
file_uploads_log = gr.State([])
|
267 |
chatbot = gr.Chatbot(
|
@@ -283,7 +286,7 @@ class GradioUI:
|
|
283 |
[upload_file, file_uploads_log],
|
284 |
[upload_status, file_uploads_log],
|
285 |
)
|
286 |
-
text_input = gr.Textbox(lines=1, label="Chat Message")
|
287 |
text_input.submit(
|
288 |
self.log_user_message,
|
289 |
[text_input, file_uploads_log],
|
|
|
24 |
from smolagents.memory import MemoryStep
|
25 |
from smolagents.utils import _is_package_available
|
26 |
|
27 |
+
greeting_message = "I can show you examples of generative art!"
|
28 |
+
example_user_message = "What does the appolonian gasket look like?"
|
29 |
|
30 |
def pull_messages_from_step(
|
31 |
step_log: MemoryStep,
|
|
|
264 |
import gradio as gr
|
265 |
|
266 |
with gr.Blocks(fill_height=True) as demo:
|
267 |
+
gr.Markdown(greeting_message)
|
268 |
stored_messages = gr.State([])
|
269 |
file_uploads_log = gr.State([])
|
270 |
chatbot = gr.Chatbot(
|
|
|
286 |
[upload_file, file_uploads_log],
|
287 |
[upload_status, file_uploads_log],
|
288 |
)
|
289 |
+
text_input = gr.Textbox(lines=1, label="Chat Message", placeholder=example_user_message)
|
290 |
text_input.submit(
|
291 |
self.log_user_message,
|
292 |
[text_input, file_uploads_log],
|