Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
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 |
}
|