Spaces:
Runtime error
Runtime error
lionelgarnier
commited on
Commit
·
cbb8f23
1
Parent(s):
76813dd
debug pipeline
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
21 |
MAX_IMAGE_SIZE = 2048
|
22 |
|
23 |
def refine_prompt(prompt):
|
24 |
-
chatbot = pipeline("text-generation", model="mistralai/Mistral-7B-Instruct-v0.3")
|
25 |
messages = [
|
26 |
{"role": "system", "content": "You are a product designer. You will get a basic prompt of product request and you need to imagine a new product design to satisfy that need. Produce an extended description of product front view that will be use by Flux to generate a visual"},
|
27 |
{"role": "user", "content": prompt},
|
@@ -83,7 +83,8 @@ with gr.Blocks(css=css) as demo:
|
|
83 |
show_label=False,
|
84 |
max_lines=10,
|
85 |
placeholder="Prompt refined by Mistral",
|
86 |
-
container=False
|
|
|
87 |
)
|
88 |
|
89 |
|
|
|
21 |
MAX_IMAGE_SIZE = 2048
|
22 |
|
23 |
def refine_prompt(prompt):
|
24 |
+
chatbot = pipeline("text-generation", model="mistralai/Mistral-7B-Instruct-v0.3", max_new_tokens=2048,)
|
25 |
messages = [
|
26 |
{"role": "system", "content": "You are a product designer. You will get a basic prompt of product request and you need to imagine a new product design to satisfy that need. Produce an extended description of product front view that will be use by Flux to generate a visual"},
|
27 |
{"role": "user", "content": prompt},
|
|
|
83 |
show_label=False,
|
84 |
max_lines=10,
|
85 |
placeholder="Prompt refined by Mistral",
|
86 |
+
container=False,
|
87 |
+
max_length=2048,
|
88 |
)
|
89 |
|
90 |
|