Spaces:
Runtime error
Runtime error
Commit
·
e76c765
1
Parent(s):
4b645a5
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import base64
|
|
6 |
|
7 |
api_url = "https://5cb20b40-572c-426f-9466-995256f9b6eb.id.repl.co/generate_image"
|
8 |
|
9 |
-
def generate_image(model="
|
10 |
data = "?model=" + model + "&prompt=" + prompt + "&seed=" + str(seed) + "&negative_prompt=" + negative_prompt + "&sampler=" + sampler + "&steps=" + str(steps)
|
11 |
response = requests.post(api_url + data, timeout=400)
|
12 |
if response.status_code == 200:
|
@@ -18,7 +18,7 @@ def generate_image(model="Abyss OrangeMix", prompt="", seed=0, negative_prompt="
|
|
18 |
return None
|
19 |
|
20 |
inputs = [
|
21 |
-
gr.inputs.Dropdown(['
|
22 |
gr.inputs.Textbox(label="Prompt"),
|
23 |
gr.inputs.Number(label="Seed", default=0),
|
24 |
gr.inputs.Textbox(label="Negative Prompt", default=""),
|
@@ -28,8 +28,8 @@ inputs = [
|
|
28 |
|
29 |
outputs = gr.outputs.Image(label="Generated Image", type="pil")
|
30 |
|
31 |
-
interface = gr.Interface(generate_image, inputs, outputs, title="
|
32 |
-
description="<center>Top
|
33 |
examples=[])
|
34 |
|
35 |
interface.launch()
|
|
|
6 |
|
7 |
api_url = "https://5cb20b40-572c-426f-9466-995256f9b6eb.id.repl.co/generate_image"
|
8 |
|
9 |
+
def generate_image(model="Seek.art MEGA", prompt="", seed=0, negative_prompt="", sampler="k_dpmpp_2s_a", steps=50):
|
10 |
data = "?model=" + model + "&prompt=" + prompt + "&seed=" + str(seed) + "&negative_prompt=" + negative_prompt + "&sampler=" + sampler + "&steps=" + str(steps)
|
11 |
response = requests.post(api_url + data, timeout=400)
|
12 |
if response.status_code == 200:
|
|
|
18 |
return None
|
19 |
|
20 |
inputs = [
|
21 |
+
gr.inputs.Dropdown(['Seek.art MEGA', 'Deliberate', 'Dreamlike Photoreal', 'Realistic Vision',], label="Model", default="Seek.art MEGA"),
|
22 |
gr.inputs.Textbox(label="Prompt"),
|
23 |
gr.inputs.Number(label="Seed", default=0),
|
24 |
gr.inputs.Textbox(label="Negative Prompt", default=""),
|
|
|
28 |
|
29 |
outputs = gr.outputs.Image(label="Generated Image", type="pil")
|
30 |
|
31 |
+
interface = gr.Interface(generate_image, inputs, outputs, title="Interior Design ",
|
32 |
+
description="<center>Top Diffusion Models to design Room interiors</center>",
|
33 |
examples=[])
|
34 |
|
35 |
interface.launch()
|