Lisandro commited on
Commit
4d4e4ab
1 Parent(s): 2ea9be2

feat: Update title in README.md and add style prompt input to infer function in app.py

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +7 -2
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: Dott
3
  emoji: ⚡
4
  colorFrom: purple
5
  colorTo: green
 
1
  ---
2
+ title: Generate game background images in the style of Day of the tentacle
3
  emoji: ⚡
4
  colorFrom: purple
5
  colorTo: green
app.py CHANGED
@@ -15,10 +15,11 @@ def infer (prompt, style_prompt, inf_steps, guidance_scale, width, height, seed,
15
  )
16
 
17
  client = Client("fffiloni/sd-xl-custom-model")
 
18
  result = client.predict(
19
  custom_model=custom_model,
20
  weight_name=weight_name,
21
- prompt="dott style. "+prompt+". "+style_prompt,
22
  inf_steps=inf_steps,
23
  guidance_scale=guidance_scale,
24
  width=width,
@@ -27,6 +28,7 @@ def infer (prompt, style_prompt, inf_steps, guidance_scale, width, height, seed,
27
  lora_weight=lora_weight,
28
  api_name="/infer"
29
  )
 
30
 
31
  return result
32
 
@@ -79,6 +81,9 @@ with gr.Blocks(css=css) as demo:
79
  style_prompt_in = gr.Textbox(
80
  label="Your Style Prompt"
81
  )
 
 
 
82
  with gr.Accordion("Advanced Settings", open=False):
83
  with gr.Row():
84
  inf_steps = gr.Slider(
@@ -137,7 +142,7 @@ with gr.Blocks(css=css) as demo:
137
  submit_btn.click(
138
  fn = infer,
139
  inputs = [prompt_in, style_prompt_in, inf_steps, guidance_scale, width, height, seed, lora_weight],
140
- outputs = [image_out, last_used_seed]
141
  )
142
 
143
  demo.launch()
 
15
  )
16
 
17
  client = Client("fffiloni/sd-xl-custom-model")
18
+ prompt = "dott style. "+prompt+". "+style_prompt
19
  result = client.predict(
20
  custom_model=custom_model,
21
  weight_name=weight_name,
22
+ prompt=prompt,
23
  inf_steps=inf_steps,
24
  guidance_scale=guidance_scale,
25
  width=width,
 
28
  lora_weight=lora_weight,
29
  api_name="/infer"
30
  )
31
+ result[2] = prompt
32
 
33
  return result
34
 
 
81
  style_prompt_in = gr.Textbox(
82
  label="Your Style Prompt"
83
  )
84
+ used_prompt = gr.Textbox(
85
+ label="Used prompt"
86
+ )
87
  with gr.Accordion("Advanced Settings", open=False):
88
  with gr.Row():
89
  inf_steps = gr.Slider(
 
142
  submit_btn.click(
143
  fn = infer,
144
  inputs = [prompt_in, style_prompt_in, inf_steps, guidance_scale, width, height, seed, lora_weight],
145
+ outputs = [image_out, last_used_seed, used_prompt]
146
  )
147
 
148
  demo.launch()