IlmaJiyadh commited on
Commit
7787d4b
·
verified ·
1 Parent(s): c20a578

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -43,7 +43,7 @@ def transcribe(audio_path):
43
  def summarize(text):
44
  prompt = f"Below is a lecture transcript. Take lecture notes in bullet points.\n\nInput:\n{text}\n\nSummary:\n"
45
  inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
46
- outputs = model.generate(**inputs, max_new_tokens=200, temperature=0.7)
47
  return tokenizer.decode(outputs[0], skip_special_tokens=True)
48
 
49
  ### SAVE TO JSON
 
43
  def summarize(text):
44
  prompt = f"Below is a lecture transcript. Take lecture notes in bullet points.\n\nInput:\n{text}\n\nSummary:\n"
45
  inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
46
+ outputs = model.generate(**inputs, max_new_tokens=200, temperature=0.7, use_cache=False)
47
  return tokenizer.decode(outputs[0], skip_special_tokens=True)
48
 
49
  ### SAVE TO JSON