Spaces:
Running
Running
alfredplpl
commited on
Commit
•
09c2e1a
1
Parent(s):
15d24fa
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,12 @@ import gradio as gr
|
|
2 |
import requests
|
3 |
import os
|
4 |
from PIL import Image
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
def inference(prompt, guidance, steps, image_size="Landscape", seed=0, img=None, strength=0.5, neg_prompt="", disable_auto_prompt_correction=False):
|
7 |
try:
|
|
|
2 |
import requests
|
3 |
import os
|
4 |
from PIL import Image
|
5 |
+
from io import BytesIO
|
6 |
+
import base64
|
7 |
+
|
8 |
+
def error_str(error, title="Error"):
|
9 |
+
return f"""#### {title}
|
10 |
+
{error}""" if error else ""
|
11 |
|
12 |
def inference(prompt, guidance, steps, image_size="Landscape", seed=0, img=None, strength=0.5, neg_prompt="", disable_auto_prompt_correction=False):
|
13 |
try:
|