ff98 commited on
Commit
e26e4aa
·
1 Parent(s): 0344777

summarize updated

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -49,9 +49,9 @@ def generate_text_from_audio(audio):
49
  audio_text_result = pipe(audio_data, generate_kwargs={"task": "translate", "forced_decoder_ids": [[1, None], [2, 50359]]})
50
  return audio_text_result["text"]
51
 
52
- def generate_summary_from_text(text, minLength, maxLength):
53
  summarizer = pipeline("summarization", model="Falconsai/text_summarization")
54
- return summarizer(text, max_length=maxLength, min_length=minLength, do_sample=False)
55
 
56
  def text_classification(text):
57
  classifier = pipeline(task="text-classification", model="SamLowe/roberta-base-go_emotions", top_k=None)
 
49
  audio_text_result = pipe(audio_data, generate_kwargs={"task": "translate", "forced_decoder_ids": [[1, None], [2, 50359]]})
50
  return audio_text_result["text"]
51
 
52
+ def generate_summary_from_text(text):
53
  summarizer = pipeline("summarization", model="Falconsai/text_summarization")
54
+ return summarizer(text, max_length=100, min_length=15, do_sample=False)
55
 
56
  def text_classification(text):
57
  classifier = pipeline(task="text-classification", model="SamLowe/roberta-base-go_emotions", top_k=None)