Spaces:
Running
Running
Update app.py
Browse files
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
|