Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -27,13 +27,13 @@ def set_system_prompt():
|
|
27 |
# Function to enhance the prompt with Qwen model
|
28 |
def enhance_prompt_with_qwen(prompt):
|
29 |
client = Client("Qwen/Qwen2.5-72B-Instruct")
|
30 |
-
result = client.predict(
|
31 |
query=prompt,
|
32 |
history=[],
|
33 |
system="You are Qwen, an image generation prompt enhancer",
|
34 |
api_name="/model_chat"
|
35 |
)
|
36 |
-
return result
|
37 |
|
38 |
# Image generation query function
|
39 |
def query(prompt, is_negative=False, steps=30, cfg_scale=7, sampler="DPM++ 2M Karras", seed=-1, strength=0.7, huggingface_api_key=None, use_dev=False):
|
|
|
27 |
# Function to enhance the prompt with Qwen model
|
28 |
def enhance_prompt_with_qwen(prompt):
|
29 |
client = Client("Qwen/Qwen2.5-72B-Instruct")
|
30 |
+
result,_,__ = client.predict(
|
31 |
query=prompt,
|
32 |
history=[],
|
33 |
system="You are Qwen, an image generation prompt enhancer",
|
34 |
api_name="/model_chat"
|
35 |
)
|
36 |
+
return result # Assuming the enhanced prompt is under 'output'
|
37 |
|
38 |
# Image generation query function
|
39 |
def query(prompt, is_negative=False, steps=30, cfg_scale=7, sampler="DPM++ 2M Karras", seed=-1, strength=0.7, huggingface_api_key=None, use_dev=False):
|