sitammeur commited on
Commit
3e08d76
·
verified ·
1 Parent(s): f19f416

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -19
app.py CHANGED
@@ -34,11 +34,6 @@ hf_hub_download(
34
  # Set the title and description
35
  title = "Dolphin-3 Llama.cpp 🐬"
36
  description = """Dolphin 3.0 is a powerful, general-purpose local AI model designed for coding, math, and various other tasks, aiming similar to the models like ChatGPT and Claude."""
37
- # examples = [
38
- # ["Provide a historical fact about the capital of France."],
39
- # ["Suggest a three-day itinerary for exploring Tokyo and nearby areas?"],
40
- # ["Can you write a short, imaginative story about exploring a forest?"],
41
- # ]
42
 
43
 
44
  def respond(
@@ -134,51 +129,68 @@ demo = gr.ChatInterface(
134
  ),
135
  additional_inputs=[
136
  gr.Dropdown(
137
- [
138
  "Dolphin3.0-Llama3.2-1B-Q6_K.gguf",
139
  "Dolphin3.0-Qwen2.5-1.5B-Q6_K.gguf",
140
  "Dolphin3.0-Qwen2.5-0.5B-Q6_K.gguf",
141
  ],
142
  value="Dolphin3.0-Llama3.2-1B-Q6_K.gguf",
143
  label="Model",
 
144
  ),
145
  gr.Textbox(
146
- value="You are Dolphin an AI assistant that helps humanity.",
147
- label="System message",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  ),
149
- gr.Slider(minimum=1, maximum=8192, value=8192, step=1, label="Max tokens"),
150
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
151
  gr.Slider(
152
  minimum=0.1,
153
  maximum=1.0,
154
  value=0.95,
155
  step=0.05,
156
  label="Top-p",
 
157
  ),
158
  gr.Slider(
159
- minimum=0,
160
  maximum=100,
161
  value=40,
162
  step=1,
163
  label="Top-k",
 
164
  ),
165
  gr.Slider(
166
- minimum=0.0,
167
  maximum=2.0,
168
  value=1.1,
169
  step=0.1,
170
- label="Repetition penalty",
171
- ),
172
- ],
173
- theme="Glass",
 
174
  submit_btn="Send",
175
  stop_btn="Stop",
176
  title=title,
177
  description=description,
178
  chatbot=gr.Chatbot(scale=1, show_copy_button=True),
179
- # examples=examples,
180
- cache_examples=True,
181
- cache_mode="lazy",
182
  flagging_mode="never",
183
  )
184
 
 
34
  # Set the title and description
35
  title = "Dolphin-3 Llama.cpp 🐬"
36
  description = """Dolphin 3.0 is a powerful, general-purpose local AI model designed for coding, math, and various other tasks, aiming similar to the models like ChatGPT and Claude."""
 
 
 
 
 
37
 
38
 
39
  def respond(
 
129
  ),
130
  additional_inputs=[
131
  gr.Dropdown(
132
+ choices=[
133
  "Dolphin3.0-Llama3.2-1B-Q6_K.gguf",
134
  "Dolphin3.0-Qwen2.5-1.5B-Q6_K.gguf",
135
  "Dolphin3.0-Qwen2.5-0.5B-Q6_K.gguf",
136
  ],
137
  value="Dolphin3.0-Llama3.2-1B-Q6_K.gguf",
138
  label="Model",
139
+ info="Select the AI model to use for chat"
140
  ),
141
  gr.Textbox(
142
+ value="You are Dolphin, a helpful AI assistant focused on accurate and ethical responses.",
143
+ label="System Prompt",
144
+ info="Define the AI assistant's personality and behavior",
145
+ lines=2
146
+ ),
147
+ gr.Slider(
148
+ minimum=512,
149
+ maximum=8192,
150
+ value=4096,
151
+ step=512,
152
+ label="Max Tokens",
153
+ info="Maximum length of response (higher = longer replies)"
154
+ ),
155
+ gr.Slider(
156
+ minimum=0.1,
157
+ maximum=2.0,
158
+ value=0.7,
159
+ step=0.1,
160
+ label="Temperature",
161
+ info="Creativity level (higher = more creative, lower = more focused)"
162
  ),
 
 
163
  gr.Slider(
164
  minimum=0.1,
165
  maximum=1.0,
166
  value=0.95,
167
  step=0.05,
168
  label="Top-p",
169
+ info="Nucleus sampling threshold"
170
  ),
171
  gr.Slider(
172
+ minimum=1,
173
  maximum=100,
174
  value=40,
175
  step=1,
176
  label="Top-k",
177
+ info="Limit vocabulary choices to top K tokens"
178
  ),
179
  gr.Slider(
180
+ minimum=1.0,
181
  maximum=2.0,
182
  value=1.1,
183
  step=0.1,
184
+ label="Repetition Penalty",
185
+ info="Penalize repeated words (higher = less repetition)"
186
+ )
187
+ ]
188
+ theme="Base",
189
  submit_btn="Send",
190
  stop_btn="Stop",
191
  title=title,
192
  description=description,
193
  chatbot=gr.Chatbot(scale=1, show_copy_button=True),
 
 
 
194
  flagging_mode="never",
195
  )
196