ccclllwww commited on
Commit
44bce0a
Β·
verified Β·
1 Parent(s): 538c02d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -18,7 +18,7 @@ _image_caption_pipeline = pipeline(
18
  )
19
 
20
  # Global model configuration constants
21
- _text_generation_pipeline = pipeline("text-generation", model="Qwen/Qwen3-0.6B")
22
 
23
  # Initialize TTS components once to avoid reloading
24
  _SPEECH_PIPELINE = pipeline("text-to-speech", model="facebook/mms-tts-eng")
@@ -241,15 +241,15 @@ if uploaded_image is not None:
241
  # Define prompt templates
242
  PROMPT_TEMPLATES = {
243
  "educational": {
244
- "system": "You are a children's educator writer. Create an educational story about ",
245
  "icon": "πŸ“š"
246
  },
247
  "adventure": {
248
- "system": "You are a fantasy writer. Create a adventure story about ",
249
  "icon": "🌠"
250
  },
251
  "animal": {
252
- "system": "You are an animal themes writer. Create a animal fairy tales about ",
253
  "icon": "🐻"
254
  }
255
  }
 
18
  )
19
 
20
  # Global model configuration constants
21
+ _text_generation_pipeline = pipeline("text-generation", model="Qwen/Qwen3-0.6B",max_new_tokens=100)
22
 
23
  # Initialize TTS components once to avoid reloading
24
  _SPEECH_PIPELINE = pipeline("text-to-speech", model="facebook/mms-tts-eng")
 
241
  # Define prompt templates
242
  PROMPT_TEMPLATES = {
243
  "educational": {
244
+ "system": "You are a children's educator writer. Create a 100-word educational story about ",
245
  "icon": "πŸ“š"
246
  },
247
  "adventure": {
248
+ "system": "You are a fantasy writer. Create a 100-word adventure story about ",
249
  "icon": "🌠"
250
  },
251
  "animal": {
252
+ "system": "You are an animal themes writer. Create a 100-word animal fairy tales about ",
253
  "icon": "🐻"
254
  }
255
  }