testing
Browse files
app.py
CHANGED
@@ -41,8 +41,8 @@ intents.message_content = True # Enable access to message content
|
|
41 |
# Initialize the bot with command prefix '!' and the specified intents
|
42 |
bot = commands.Bot(command_prefix='!', intents=intents, help_command=None)
|
43 |
|
44 |
-
# Regular expression to parse the prompt parameter
|
45 |
-
PROMPT_REGEX = re.compile(r'prompt\s*=\s*"(.*?)"')
|
46 |
|
47 |
# Initialize the Gradio client with hf_token
|
48 |
GRADIO_CLIENT = Client("Nevaehni/FLUX.1-schnell", hf_token=HF_TOKEN)
|
@@ -75,7 +75,8 @@ def create_example_embed() -> Embed:
|
|
75 |
Returns:
|
76 |
Embed: The Discord embed object.
|
77 |
"""
|
78 |
-
|
|
|
79 |
embed = Embed(
|
80 |
description=f"```\n{example_command}\n```",
|
81 |
color=discord.Color.blue()
|
|
|
41 |
# Initialize the bot with command prefix '!' and the specified intents
|
42 |
bot = commands.Bot(command_prefix='!', intents=intents, help_command=None)
|
43 |
|
44 |
+
# Regular expression to parse the prompt parameter with DOTALL flag to include newlines
|
45 |
+
PROMPT_REGEX = re.compile(r'prompt\s*=\s*"(.*?)"', re.DOTALL)
|
46 |
|
47 |
# Initialize the Gradio client with hf_token
|
48 |
GRADIO_CLIENT = Client("Nevaehni/FLUX.1-schnell", hf_token=HF_TOKEN)
|
|
|
75 |
Returns:
|
76 |
Embed: The Discord embed object.
|
77 |
"""
|
78 |
+
# Example command with a newline character
|
79 |
+
example_command = '!generate prompt="High resolution serene landscape\nwith text \'cucolina\'. seed:1"'
|
80 |
embed = Embed(
|
81 |
description=f"```\n{example_command}\n```",
|
82 |
color=discord.Color.blue()
|