Update hybrid_pipe.py
Browse files- hybrid_pipe.py +1 -1
hybrid_pipe.py
CHANGED
@@ -75,7 +75,7 @@ class HybridQAModel(nn.Module, PyTorchModelHubMixin):
|
|
75 |
average_confidence = sum(max_confidence_scores) / len(max_confidence_scores) # Calculate average confidence
|
76 |
|
77 |
decoded_output = tokenizer.decode(generated_outputs.sequences[0], skip_special_tokens=True)
|
78 |
-
final_output = decoded_output[len(
|
79 |
average_confidence, final_output
|
80 |
return final_output, average_confidence
|
81 |
|
|
|
75 |
average_confidence = sum(max_confidence_scores) / len(max_confidence_scores) # Calculate average confidence
|
76 |
|
77 |
decoded_output = tokenizer.decode(generated_outputs.sequences[0], skip_special_tokens=True)
|
78 |
+
final_output = decoded_output[len(input_text):].split("\n")[-1]
|
79 |
average_confidence, final_output
|
80 |
return final_output, average_confidence
|
81 |
|