mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Summarizer angepasst
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
// Prepare output directory (always storage/transcriptionSummaries under project root)
|
||||
const outputDir = `${__dirname}/../../../storage/transcriptionSummaries`;
|
||||
@@ -6,6 +7,7 @@ if (!fs.existsSync(outputDir)) {
|
||||
fs.mkdirSync(outputDir, { recursive: true });
|
||||
}
|
||||
|
||||
|
||||
module.exports = {
|
||||
name: "summarize-transcription", // Unique name for our function that will later be used to get the function from the map via "mapFunctions.get("example").function()"
|
||||
type: "summarizer", // value used to differentiate each module to order them in the UI
|
||||
@@ -32,7 +34,8 @@ module.exports = {
|
||||
return { error: "Invalid JSON" };
|
||||
}
|
||||
}
|
||||
console.log(inputJson);
|
||||
// console.log(inputJson);
|
||||
console.log(outputDir);
|
||||
const words = inputJson.words;
|
||||
if (!Array.isArray(words)) {
|
||||
return { error: "No words Array found" };
|
||||
|
||||
Reference in New Issue
Block a user