Spaces:
Running
Running
adjust output file name to summary.txt
Browse files- summarize_transcript.py +4 -4
summarize_transcript.py
CHANGED
|
@@ -96,13 +96,13 @@ def main():
|
|
| 96 |
print(transcript[:500] + "..." if len(transcript) > 500 else transcript)
|
| 97 |
|
| 98 |
# Summarize in Chinese (zh-TW) with streaming
|
| 99 |
-
|
| 100 |
|
| 101 |
# Save summaries to files
|
| 102 |
-
with open("/home/luigi/tiny-scribe/
|
| 103 |
-
f.write(
|
| 104 |
|
| 105 |
-
print("\nSummaries saved to
|
| 106 |
|
| 107 |
# Clean up
|
| 108 |
del llm
|
|
|
|
| 96 |
print(transcript[:500] + "..." if len(transcript) > 500 else transcript)
|
| 97 |
|
| 98 |
# Summarize in Chinese (zh-TW) with streaming
|
| 99 |
+
summary = stream_summarize_transcript(llm, transcript)
|
| 100 |
|
| 101 |
# Save summaries to files
|
| 102 |
+
with open("/home/luigi/tiny-scribe/summary.txt", 'w', encoding='utf-8') as f:
|
| 103 |
+
f.write(summary)
|
| 104 |
|
| 105 |
+
print("\nSummaries saved to summary.txt.")
|
| 106 |
|
| 107 |
# Clean up
|
| 108 |
del llm
|