Spaces:
Running
Running
Update GRADIO_UI.py
Browse files- GRADIO_UI.py +20 -1
GRADIO_UI.py
CHANGED
@@ -193,6 +193,24 @@ class GradioUI:
|
|
193 |
def launch(self, **kwargs):
|
194 |
import gradio as gr
|
195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
with gr.Blocks(fill_height=True) as demo:
|
197 |
stored_messages = gr.State([])
|
198 |
chatbot = gr.Chatbot(
|
@@ -203,8 +221,9 @@ class GradioUI:
|
|
203 |
"./icon.png"
|
204 |
),
|
205 |
scale=1,
|
|
|
206 |
)
|
207 |
-
text_input = gr.Textbox(lines=1, label="Enter URL and request (e.g., navigate to https://www.
|
208 |
text_input.submit(
|
209 |
self.interact_with_agent,
|
210 |
[text_input, stored_messages],
|
|
|
193 |
def launch(self, **kwargs):
|
194 |
import gradio as gr
|
195 |
|
196 |
+
# Custom CSS for avatar alignment
|
197 |
+
css = """
|
198 |
+
.chatbot .avatar-container {
|
199 |
+
display: flex !important;
|
200 |
+
justify-content: center !important;
|
201 |
+
align-items: center !important;
|
202 |
+
width: 40px !important;
|
203 |
+
height: 40px !important;
|
204 |
+
overflow: hidden !important;
|
205 |
+
}
|
206 |
+
.chatbot .avatar-container img {
|
207 |
+
width: 100% !important;
|
208 |
+
height: 100% !important;
|
209 |
+
object-fit: cover !important;
|
210 |
+
border-radius: 50% !important;
|
211 |
+
}
|
212 |
+
"""
|
213 |
+
|
214 |
with gr.Blocks(fill_height=True) as demo:
|
215 |
stored_messages = gr.State([])
|
216 |
chatbot = gr.Chatbot(
|
|
|
221 |
"./icon.png"
|
222 |
),
|
223 |
scale=1,
|
224 |
+
height=600,
|
225 |
)
|
226 |
+
text_input = gr.Textbox(lines=1, label="Enter URL and request (e.g., Please could you navigate to https://www.federalreserve.gov/releases/h15/ and extract interest rates)")
|
227 |
text_input.submit(
|
228 |
self.interact_with_agent,
|
229 |
[text_input, stored_messages],
|