Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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=
|
24 |
inf_steps=25,
|
25 |
guidance_scale=12,
|
26 |
width=1024,
|
@@ -32,12 +32,11 @@ def predict():
|
|
32 |
|
33 |
return result
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
outputs=
|
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 |
|