Spaces:
Sleeping
Sleeping
UI cleanup
Browse files- gemmademo/_chat.py +24 -25
gemmademo/_chat.py
CHANGED
|
@@ -102,31 +102,30 @@ class GradioChat:
|
|
| 102 |
|
| 103 |
with gr.Blocks() as demo:
|
| 104 |
with gr.Row():
|
| 105 |
-
with gr.
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
)
|
| 129 |
-
)
|
| 130 |
|
| 131 |
with gr.Column(scale=1):
|
| 132 |
gr.Markdown(
|
|
|
|
| 102 |
|
| 103 |
with gr.Blocks() as demo:
|
| 104 |
with gr.Row():
|
| 105 |
+
with gr.Column(scale=3): # Sidebar column
|
| 106 |
+
with gr.Accordion(
|
| 107 |
+
"Basic Settings ⚙️", open=False
|
| 108 |
+
): # Make the sidebar foldable
|
| 109 |
+
gr.Markdown(
|
| 110 |
+
"## Google Gemma Models: lightweight, state-of-the-art open models from Google"
|
| 111 |
+
)
|
| 112 |
+
task_dropdown = gr.Dropdown(
|
| 113 |
+
choices=self.task_options,
|
| 114 |
+
value=self.current_task_name,
|
| 115 |
+
label="Select Task",
|
| 116 |
+
)
|
| 117 |
+
model_dropdown = gr.Dropdown(
|
| 118 |
+
choices=self.model_options,
|
| 119 |
+
value=self.current_model_name,
|
| 120 |
+
label="Select Gemma Model",
|
| 121 |
+
)
|
| 122 |
+
chat_interface = gr.ChatInterface(
|
| 123 |
+
chat_fn,
|
| 124 |
+
additional_inputs=[model_dropdown, task_dropdown],
|
| 125 |
+
textbox=gr.Textbox(
|
| 126 |
+
placeholder="Ask me something...", container=False
|
| 127 |
+
),
|
| 128 |
+
)
|
|
|
|
| 129 |
|
| 130 |
with gr.Column(scale=1):
|
| 131 |
gr.Markdown(
|