Project Alpha 3
This commit is contained in:
parent
1650f3fccb
commit
d3e07ede69
@ -1,6 +1,12 @@
|
||||
from transformers import pipeline
|
||||
|
||||
def process(input_text):
|
||||
summarizer = pipeline("summarization", model="marianna13/flan-t5-base-summarization", max_length=200, min_length=10, device="mps")
|
||||
summarizer = pipeline(
|
||||
"summarization",
|
||||
model="marianna13/flan-t5-base-summarization",
|
||||
max_length=200,
|
||||
min_length=10,
|
||||
device="mps"
|
||||
)
|
||||
output = summarizer(input_text)[0]['summary_text']
|
||||
return output
|
||||
|
@ -15,6 +15,7 @@ def process(audio_path):
|
||||
tokenizer=processor.tokenizer,
|
||||
feature_extractor=processor.feature_extractor,
|
||||
torch_dtype=torch.float32,
|
||||
return_timestamps=True,
|
||||
device="mps"
|
||||
)
|
||||
output = pipe(audio_path)["text"]
|
||||
|
Loading…
Reference in New Issue
Block a user