Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files
index.py
CHANGED
@@ -37,7 +37,7 @@ def generate_sd3_image(prompt):
|
|
37 |
return Image.open(io.BytesIO(response.content))
|
38 |
|
39 |
def generate_pattern(image, prompt):
|
40 |
-
|
41 |
if image is not None:
|
42 |
# Convert the numpy array to a PIL image
|
43 |
starter_image_pil = Image.fromarray(image.astype('uint8'))
|
@@ -110,6 +110,6 @@ def generate_pattern(image, prompt):
|
|
110 |
|
111 |
return images
|
112 |
|
113 |
-
|
114 |
-
demo = gr.Interface(fn=generate_pattern, inputs=["image", "text"], outputs=["image", "image", "image"])
|
115 |
demo.launch(share=False)
|
|
|
37 |
return Image.open(io.BytesIO(response.content))
|
38 |
|
39 |
def generate_pattern(image, prompt):
|
40 |
+
raise gr.Error(header)
|
41 |
if image is not None:
|
42 |
# Convert the numpy array to a PIL image
|
43 |
starter_image_pil = Image.fromarray(image.astype('uint8'))
|
|
|
110 |
|
111 |
return images
|
112 |
|
113 |
+
header = "Set up APIs on HuggingFace or use free at https://app.idai.tools/ (https://app.idai.tools/interface/seamless_patterns)"
|
114 |
+
demo = gr.Interface(fn=generate_pattern, inputs=["image", "text"], outputs=["image", "image", "image"], title=header)
|
115 |
demo.launch(share=False)
|