lichorosario commited on
Commit
0c78e19
·
verified ·
1 Parent(s): 5ff7b77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -9,7 +9,7 @@ api_key = os.getenv('HF_API_KEY')
9
  from gradio_client import Client
10
 
11
 
12
- def predict():
13
  client = Client("fffiloni/sd-xl-custom-model")
14
  result = client.predict(
15
  custom_model="lichorosario/dott_remastered_style_lora_sdxl",
@@ -20,7 +20,7 @@ def predict():
20
  result = client.predict(
21
  custom_model="lichorosario/dott_remastered_style_lora_sdxl",
22
  weight_name="dott_style.safetensors",
23
- prompt="house interior. two vanishing points, one at the left and one at the right. Cartoon background. Curved perspective. Retro cartoon scene. twisted objects. simple irregular shapes. Cartoon Expressionism.foreshortening. wide angle. lens distortion. converging lines",
24
  inf_steps=25,
25
  guidance_scale=12,
26
  width=1024,
@@ -32,12 +32,11 @@ def predict():
32
 
33
  return result
34
 
35
-
36
- demo = gr.Interface(
37
- fn=predict,
38
- inputs=[],
39
- outputs=["image", "text"],
40
- )
41
 
42
  demo.launch()
43
 
 
9
  from gradio_client import Client
10
 
11
 
12
+ def predict(prompt):
13
  client = Client("fffiloni/sd-xl-custom-model")
14
  result = client.predict(
15
  custom_model="lichorosario/dott_remastered_style_lora_sdxl",
 
20
  result = client.predict(
21
  custom_model="lichorosario/dott_remastered_style_lora_sdxl",
22
  weight_name="dott_style.safetensors",
23
+ prompt=prompt,
24
  inf_steps=25,
25
  guidance_scale=12,
26
  width=1024,
 
32
 
33
  return result
34
 
35
+ with gr.Blocks() as demo:
36
+ inputs = gr.Textbox(label="Prompt")
37
+ outputs = [gr.Image(label="Image"), gr.Textbox(label="Seed")]
38
+ greet_btn = gr.Button("Generate")
39
+ greet_btn.click(fn=predict, inputs=inputs, outputs=outputs, api_name="predict")
 
40
 
41
  demo.launch()
42