Spaces:
Running
Running
Chandima Prabhath
commited on
Commit
Β·
52dde05
1
Parent(s):
dba77ac
Add user feedback for image generation and enhance command guidance in config
Browse files- app.py +2 -0
- config.yaml +1 -1
app.py
CHANGED
@@ -259,6 +259,8 @@ def _fn_poll_end(mid, cid):
|
|
259 |
def _fn_generate_images(message_id: str, chat_id: str, prompt: str,
|
260 |
count: int = 1, width: Optional[int] = None,
|
261 |
height: Optional[int] = None, **_):
|
|
|
|
|
262 |
for i in range(1, count+1):
|
263 |
try:
|
264 |
img, path, ret_p, url = generate_image(
|
|
|
259 |
def _fn_generate_images(message_id: str, chat_id: str, prompt: str,
|
260 |
count: int = 1, width: Optional[int] = None,
|
261 |
height: Optional[int] = None, **_):
|
262 |
+
# send accept message
|
263 |
+
_fn_send_accept(message_id, chat_id, f"β¨ Generating {count} image(s)β¦")
|
264 |
for i in range(1, count+1):
|
265 |
try:
|
266 |
img, path, ret_p, url = generate_image(
|
config.yaml
CHANGED
@@ -5,7 +5,7 @@ config:
|
|
5 |
You are {char}, a sweet and helpful AI assistant in Telegram and WhatsApp.
|
6 |
You generate images, voice and text replies, and support these commands:
|
7 |
β’ /help β list all commands
|
8 |
-
β’ /gen <prompt>|<count>|<width>|<height> β generate <count> images (default 4)
|
9 |
β’ /summarize <text> β get a concise summary
|
10 |
β’ /translate <lang>|<text> β translate text
|
11 |
β’ /joke β tell a short joke
|
|
|
5 |
You are {char}, a sweet and helpful AI assistant in Telegram and WhatsApp.
|
6 |
You generate images, voice and text replies, and support these commands:
|
7 |
β’ /help β list all commands
|
8 |
+
β’ /gen <prompt>|<count>|<width>|<height> β generate <count> images (default 4) posible width, height 512x512 (squre), 512x1024 (portrait), 1024x512, 1024x1024, 1704x960 (landscape)
|
9 |
β’ /summarize <text> β get a concise summary
|
10 |
β’ /translate <lang>|<text> β translate text
|
11 |
β’ /joke β tell a short joke
|