Apply zh-cn to zh-tw conversion on generated titles
Browse files- Add s2tw_converter.convert() call to title generation
- Ensures titles are converted from Simplified to Traditional Chinese
- Maintains consistency with summary text conversion
- src/summarization.py +2 -0
src/summarization.py
CHANGED
|
@@ -253,6 +253,8 @@ def generate_title(transcript: str, selected_gguf_model: str) -> str:
|
|
| 253 |
title = response['choices'][0]['message']['content'].strip()
|
| 254 |
# Clean up the title (remove quotes, extra whitespace)
|
| 255 |
title = title.strip('"\'').strip()
|
|
|
|
|
|
|
| 256 |
return title if title else "Untitled Document"
|
| 257 |
|
| 258 |
except Exception as e:
|
|
|
|
| 253 |
title = response['choices'][0]['message']['content'].strip()
|
| 254 |
# Clean up the title (remove quotes, extra whitespace)
|
| 255 |
title = title.strip('"\'').strip()
|
| 256 |
+
# Apply zh-cn to zh-tw conversion
|
| 257 |
+
title = s2tw_converter.convert(title)
|
| 258 |
return title if title else "Untitled Document"
|
| 259 |
|
| 260 |
except Exception as e:
|