mirror of
https://github.com/patw/AudioSumma.git
synced 2025-09-04 11:40:34 +00:00
Switched bytes to tokens to be consistent with output. Allowed much larger outputs and inputs to support long context models.
This commit is contained in:
parent
6e2fa21b62
commit
9b8a6077bf
1 changed files with 7 additions and 6 deletions
13
meetings.py
13
meetings.py
|
@ -35,7 +35,7 @@ class RecordingApp(QWidget):
|
||||||
"SUMMARY_PROMPT": "Call Transcript: {chunk}\n\nInstruction: Summarize the above call transcript but DO NOT MENTION THE TRANSCRIPT",
|
"SUMMARY_PROMPT": "Call Transcript: {chunk}\n\nInstruction: Summarize the above call transcript but DO NOT MENTION THE TRANSCRIPT",
|
||||||
"FACT_PROMPT": "Call Transcript: {chunk}\n\nInstruction: Summarize all the facts in the transcript, one per line bullet point",
|
"FACT_PROMPT": "Call Transcript: {chunk}\n\nInstruction: Summarize all the facts in the transcript, one per line bullet point",
|
||||||
"SENTIMENT_PROMPT": "Call Transcript: {chunk}\n\nInstruction: Summarize the sentiment for topics in the above call transcript but DO NOT MENTION THE TRANSCRIPT",
|
"SENTIMENT_PROMPT": "Call Transcript: {chunk}\n\nInstruction: Summarize the sentiment for topics in the above call transcript but DO NOT MENTION THE TRANSCRIPT",
|
||||||
"CHUNK_SIZE": 12288,
|
"CHUNK_SIZE": 3000,
|
||||||
"MAX_TOKENS": 1000
|
"MAX_TOKENS": 1000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,9 +228,10 @@ class RecordingApp(QWidget):
|
||||||
chunks = []
|
chunks = []
|
||||||
lines = string.split("\n")
|
lines = string.split("\n")
|
||||||
current_chunk = ""
|
current_chunk = ""
|
||||||
|
chunk_bytes = chunk_size * 4 # Tokens average out to 4 bytes each
|
||||||
for line in lines:
|
for line in lines:
|
||||||
current_chunk += line
|
current_chunk += line
|
||||||
if len(current_chunk) >= chunk_size:
|
if len(current_chunk) >= chunk_bytes:
|
||||||
chunks.append(current_chunk)
|
chunks.append(current_chunk)
|
||||||
current_chunk = ""
|
current_chunk = ""
|
||||||
if current_chunk:
|
if current_chunk:
|
||||||
|
@ -330,10 +331,10 @@ class ConfigDialog(QDialog):
|
||||||
text_edit.setMinimumSize(500, 80) # Width, Height
|
text_edit.setMinimumSize(500, 80) # Width, Height
|
||||||
text_edit.setLineWrapMode(QTextEdit.WidgetWidth)
|
text_edit.setLineWrapMode(QTextEdit.WidgetWidth)
|
||||||
self.chunk_size = QSpinBox()
|
self.chunk_size = QSpinBox()
|
||||||
self.chunk_size.setRange(1000, 32000)
|
self.chunk_size.setRange(2000, 128000)
|
||||||
self.chunk_size.setValue(config["CHUNK_SIZE"])
|
self.chunk_size.setValue(config["CHUNK_SIZE"])
|
||||||
self.max_tokens = QSpinBox()
|
self.max_tokens = QSpinBox()
|
||||||
self.max_tokens.setRange(512, 4096)
|
self.max_tokens.setRange(512, 8000)
|
||||||
self.max_tokens.setValue(config["MAX_TOKENS"])
|
self.max_tokens.setValue(config["MAX_TOKENS"])
|
||||||
|
|
||||||
layout.addRow("Whisper URL:", self.whisper_url)
|
layout.addRow("Whisper URL:", self.whisper_url)
|
||||||
|
@ -342,12 +343,12 @@ class ConfigDialog(QDialog):
|
||||||
layout.addRow("Summary Prompt:", self.summary_prompt)
|
layout.addRow("Summary Prompt:", self.summary_prompt)
|
||||||
layout.addRow("Fact Prompt:", self.fact_prompt)
|
layout.addRow("Fact Prompt:", self.fact_prompt)
|
||||||
layout.addRow("Sentiment Prompt:", self.sentiment_prompt)
|
layout.addRow("Sentiment Prompt:", self.sentiment_prompt)
|
||||||
layout.addRow("Chunk Size:", self.chunk_size)
|
layout.addRow("Tokens Per Chunk:", self.chunk_size)
|
||||||
self.output_dir = QTextEdit(config["OUTPUT_DIR"])
|
self.output_dir = QTextEdit(config["OUTPUT_DIR"])
|
||||||
self.output_dir.setMinimumSize(500, 80)
|
self.output_dir.setMinimumSize(500, 80)
|
||||||
self.output_dir.setLineWrapMode(QTextEdit.WidgetWidth)
|
self.output_dir.setLineWrapMode(QTextEdit.WidgetWidth)
|
||||||
|
|
||||||
layout.addRow("Max Tokens:", self.max_tokens)
|
layout.addRow("Max Output Tokens:", self.max_tokens)
|
||||||
layout.addRow("Output Directory:", self.output_dir)
|
layout.addRow("Output Directory:", self.output_dir)
|
||||||
|
|
||||||
buttons = QHBoxLayout()
|
buttons = QHBoxLayout()
|
||||||
|
|
Loading…
Add table
Reference in a new issue