Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
airtanscropt
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SexHackMe
airtanscropt
Commits
7d3a3238
Commit
7d3a3238
authored
Dec 11, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract only the assistant's response from the generated text
parent
407226d7
Pipeline
#210
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
transcript.py
transcript.py
+6
-1
No files found.
transcript.py
View file @
7d3a3238
...
...
@@ -114,7 +114,12 @@ def main():
# Inference: Generation of the output text
text_ids
,
_
=
model
.
generate
(
**
inputs
,
use_audio_in_video
=
False
)
text
=
processor
.
batch_decode
(
text_ids
,
skip_special_tokens
=
True
,
clean_up_tokenization_spaces
=
False
)[
0
]
full_text
=
processor
.
batch_decode
(
text_ids
,
skip_special_tokens
=
True
,
clean_up_tokenization_spaces
=
False
)[
0
]
# Extract only the assistant's response
if
"assistant
\n
"
in
full_text
:
text
=
full_text
.
split
(
"assistant
\n
"
)[
-
1
]
.
strip
()
else
:
text
=
full_text
.
strip
()
# Format timestamps
start_min
,
start_sec
=
divmod
(
start
,
60
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment