Spaces:
Runtime error
Runtime error
Update fine_tuning.py
Browse files- fine_tuning.py +1 -1
fine_tuning.py
CHANGED
@@ -42,7 +42,7 @@ def prepare_data(input_texts, target_texts):
|
|
42 |
return {"input_ids": inputs["input_ids"], "attention_mask": inputs["attention_mask"], "labels": targets["input_ids"]}
|
43 |
|
44 |
def paraphrase_with_model(text, model, tokenizer):
|
45 |
-
prompt = "
|
46 |
inputs = tokenizer(prompt, return_tensors="pt", padding=True, truncation=True, max_length=512)
|
47 |
output_ids = model.generate(
|
48 |
inputs["input_ids"],
|
|
|
42 |
return {"input_ids": inputs["input_ids"], "attention_mask": inputs["attention_mask"], "labels": targets["input_ids"]}
|
43 |
|
44 |
def paraphrase_with_model(text, model, tokenizer):
|
45 |
+
prompt = "Create a detailed, structured teaching transcript from the following text: " + text
|
46 |
inputs = tokenizer(prompt, return_tensors="pt", padding=True, truncation=True, max_length=512)
|
47 |
output_ids = model.generate(
|
48 |
inputs["input_ids"],
|