Spaces:
Build error
Build error
PatrickSchrML
commited on
Commit
·
a27d199
1
Parent(s):
7013f52
test
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ def infer(prompt, n_samples, steps, scale, seed):
|
|
42 |
|
43 |
data = json.load(BytesIO(response.content))
|
44 |
if 'output' not in data:
|
45 |
-
raise gr.Error("
|
46 |
else:
|
47 |
if data['output']['result_type'] == "error":
|
48 |
raise gr.Error(data['output']['value'])
|
@@ -51,7 +51,7 @@ def infer(prompt, n_samples, steps, scale, seed):
|
|
51 |
images.append(im)
|
52 |
|
53 |
response = requests.post(url, json={
|
54 |
-
"model": "
|
55 |
"prompt": prompt,
|
56 |
"n": int(n_samples),
|
57 |
"height": 512,
|
|
|
42 |
|
43 |
data = json.load(BytesIO(response.content))
|
44 |
if 'output' not in data:
|
45 |
+
raise gr.Error("An error occurred.")
|
46 |
else:
|
47 |
if data['output']['result_type'] == "error":
|
48 |
raise gr.Error(data['output']['value'])
|
|
|
51 |
images.append(im)
|
52 |
|
53 |
response = requests.post(url, json={
|
54 |
+
"model": "StableDiffusion",
|
55 |
"prompt": prompt,
|
56 |
"n": int(n_samples),
|
57 |
"height": 512,
|