davanstrien HF Staff commited on
Commit
6c47666
·
1 Parent(s): 3961ac6
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -48,7 +48,7 @@ def generate_instruction_response():
48
  len(extract_input) :
49
  ].split("\n")[0]
50
 
51
- first_rep = "## Generated instructions:\n\n" + sanitized_instruction
52
  yield first_rep + "\n\n generating LLM response..."
53
 
54
  response_template = f"""<|begin_of_text|><|start_header_id|>user<|end_header_id|>\n\n{sanitized_instruction}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n"""
@@ -64,7 +64,7 @@ def generate_instruction_response():
64
 
65
  assistant_response = response[0]["generated_text"][len(response_template) :]
66
 
67
- yield (first_rep + "\n\n## Generated response:\n\n" + assistant_response)
68
 
69
 
70
  title = "Magpie demo"
 
48
  len(extract_input) :
49
  ].split("\n")[0]
50
 
51
+ first_rep = "## LLm generated instruction:\n\n" + sanitized_instruction
52
  yield first_rep + "\n\n generating LLM response..."
53
 
54
  response_template = f"""<|begin_of_text|><|start_header_id|>user<|end_header_id|>\n\n{sanitized_instruction}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n"""
 
64
 
65
  assistant_response = response[0]["generated_text"][len(response_template) :]
66
 
67
+ yield (first_rep + "\n\n## LLM Generated response:\n\n" + assistant_response)
68
 
69
 
70
  title = "Magpie demo"