Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -44,10 +44,10 @@ def bot_streaming(message, history, max_tokens, temperature, top_p, top_k, repet
|
|
44 |
model_outputs = model.generate(**generation_kwargs)
|
45 |
dpo_outputs = model_dpo.generate(**generation_kwargs)
|
46 |
|
47 |
-
|
48 |
-
|
49 |
|
50 |
-
generated_text = f"<h3>Base model cevabı:</h3>\n{
|
51 |
|
52 |
return generated_text
|
53 |
|
|
|
44 |
model_outputs = model.generate(**generation_kwargs)
|
45 |
dpo_outputs = model_dpo.generate(**generation_kwargs)
|
46 |
|
47 |
+
ref_text = processor.batch_decode(model_outputs, skip_special_tokens=True)[0]
|
48 |
+
dpo_text = processor.batch_decode(dpo_outputs, skip_special_tokens=True)[0]
|
49 |
|
50 |
+
generated_text = f"<h3>Base model cevabı:</h3>\n{ref_text[len(prompt)+1:]}\n<h3>DPO model cevabı:</h3>\n{dpo_text[len(prompt)+1]:}"
|
51 |
|
52 |
return generated_text
|
53 |
|