Spaces:
Sleeping
Sleeping
fix
Browse files- gemmademo/_chat.py +16 -16
gemmademo/_chat.py
CHANGED
|
@@ -106,19 +106,19 @@ class GradioChat:
|
|
| 106 |
with gr.Accordion(
|
| 107 |
"Basic Settings ⚙️", open=False
|
| 108 |
): # Make the sidebar foldable
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
chat_interface = gr.ChatInterface(
|
| 123 |
chat_fn,
|
| 124 |
additional_inputs=[model_dropdown, task_dropdown],
|
|
@@ -132,9 +132,9 @@ class GradioChat:
|
|
| 132 |
"""
|
| 133 |
## Tips
|
| 134 |
|
| 135 |
-
- First response will be slower (model loading)
|
| 136 |
-
- Switching models clears chat history
|
| 137 |
-
- Larger models
|
| 138 |
"""
|
| 139 |
)
|
| 140 |
examples_list = gr.Examples(
|
|
|
|
| 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],
|
|
|
|
| 132 |
"""
|
| 133 |
## Tips
|
| 134 |
|
| 135 |
+
- First response after model change will be slower (model loading lazily).
|
| 136 |
+
- Switching models clears chat history.
|
| 137 |
+
- Larger models need more memory but give better results.
|
| 138 |
"""
|
| 139 |
)
|
| 140 |
examples_list = gr.Examples(
|