Spaces:
Sleeping
Sleeping
Eric Gardner
commited on
Commit
·
8067185
1
Parent(s):
be647a4
Use LaMini-Flan-T5-248M (distilled model)
Browse files
services/questionGenerator.js
CHANGED
|
@@ -3,12 +3,12 @@ import { pipeline } from '@xenova/transformers';
|
|
| 3 |
let generator = null;
|
| 4 |
|
| 5 |
/**
|
| 6 |
-
* Initialize the question generation model (Flan-T5-
|
| 7 |
*/
|
| 8 |
export async function initQuestionGenerator() {
|
| 9 |
if ( !generator ) {
|
| 10 |
-
console.log( 'Loading question generation model (
|
| 11 |
-
generator = await pipeline( 'text2text-generation', 'Xenova/
|
| 12 |
console.log( 'Question generation model loaded.' );
|
| 13 |
}
|
| 14 |
return generator;
|
|
|
|
| 3 |
let generator = null;
|
| 4 |
|
| 5 |
/**
|
| 6 |
+
* Initialize the question generation model (LaMini-Flan-T5-248M)
|
| 7 |
*/
|
| 8 |
export async function initQuestionGenerator() {
|
| 9 |
if ( !generator ) {
|
| 10 |
+
console.log( 'Loading question generation model (LaMini-Flan-T5-248M)...' );
|
| 11 |
+
generator = await pipeline( 'text2text-generation', 'Xenova/LaMini-Flan-T5-248M' );
|
| 12 |
console.log( 'Question generation model loaded.' );
|
| 13 |
}
|
| 14 |
return generator;
|