acmc commited on
Commit
ac08d51
1 Parent(s): bd73a7b

System prompt

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -154,6 +154,8 @@ The {model_role} and the {user_role} can send multiple messages in a row, as a J
154
  gr.Warning(
155
  "Warning: There are less than 50 training examples. The model may not perform well with such a small dataset. Consider adding more chat files to increase the number of training examples."
156
  )
 
 
157
 
158
  return (
159
  file_path,
@@ -164,6 +166,8 @@ The {model_role} and the {user_role} can send multiple messages in a row, as a J
164
  fig_num_messages_distribution_plot,
165
  fig_num_total_tokens_per_example_plot,
166
  fig_num_assistant_tokens_per_example_plot,
 
 
167
  )
168
 
169
 
@@ -278,6 +282,8 @@ with gr.Blocks(theme=theme) as demo:
278
  visible=False,
279
  variant="secondary",
280
  )
 
 
281
  # output_example = gr.JSON(label="Example Training Example")
282
 
283
  with gr.Group():
@@ -316,6 +322,8 @@ with gr.Blocks(theme=theme) as demo:
316
  num_messages_distribution_plot,
317
  num_total_tokens_per_example_plot,
318
  num_assistant_tokens_per_example_plot,
 
 
319
  ],
320
  )
321
 
 
154
  gr.Warning(
155
  "Warning: There are less than 50 training examples. The model may not perform well with such a small dataset. Consider adding more chat files to increase the number of training examples."
156
  )
157
+
158
+ system_prompt_to_use = full_system_prompt
159
 
160
  return (
161
  file_path,
 
166
  fig_num_messages_distribution_plot,
167
  fig_num_total_tokens_per_example_plot,
168
  fig_num_assistant_tokens_per_example_plot,
169
+ system_prompt_to_use,
170
+ gr.update(visible=True),
171
  )
172
 
173
 
 
282
  visible=False,
283
  variant="secondary",
284
  )
285
+
286
+ system_prompt_to_use = gr.Textbox(label="System Prompt that you can use", visible=False, interactive=False, show_copy_button=True, info="When using the model, if you're asked for a system prompt, you can use this text.")
287
  # output_example = gr.JSON(label="Example Training Example")
288
 
289
  with gr.Group():
 
322
  num_messages_distribution_plot,
323
  num_total_tokens_per_example_plot,
324
  num_assistant_tokens_per_example_plot,
325
+ system_prompt_to_use,
326
+ system_prompt_to_use
327
  ],
328
  )
329