Spaces:
Sleeping
Sleeping
Set gallery size to 1 and server to fair
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def infer(prompt):
|
|
29 |
images = []
|
30 |
image = text_to_image(prompt)
|
31 |
image = np.array(Image.open(image).convert('RGB'))
|
32 |
-
images = [image
|
33 |
return images
|
34 |
|
35 |
|
@@ -241,7 +241,7 @@ with block:
|
|
241 |
# gallery = gr.Image(type="filepath").style(grid=[2], height="auto")
|
242 |
gallery = gr.Gallery(
|
243 |
label="Generated images", show_label=False, elem_id="gallery"
|
244 |
-
).style(grid=[
|
245 |
|
246 |
# with gr.Group(elem_id="container-advanced-btns"):
|
247 |
# advanced_button = gr.Button("Advanced options", elem_id="advanced-btn")
|
|
|
29 |
images = []
|
30 |
image = text_to_image(prompt)
|
31 |
image = np.array(Image.open(image).convert('RGB'))
|
32 |
+
images = [image]
|
33 |
return images
|
34 |
|
35 |
|
|
|
241 |
# gallery = gr.Image(type="filepath").style(grid=[2], height="auto")
|
242 |
gallery = gr.Gallery(
|
243 |
label="Generated images", show_label=False, elem_id="gallery"
|
244 |
+
).style(grid=[1], height="auto")
|
245 |
|
246 |
# with gr.Group(elem_id="container-advanced-btns"):
|
247 |
# advanced_button = gr.Button("Advanced options", elem_id="advanced-btn")
|
fair.py
CHANGED
@@ -7,8 +7,8 @@ logger = logging.getLogger()
|
|
7 |
|
8 |
import requests
|
9 |
|
10 |
-
|
11 |
-
SERVER_ADRESS="http://localhost:8000/api/v1"
|
12 |
DOCKER_IMAGE="faircompute/stable-diffusion:pytorch-1.13.1-cu116"
|
13 |
#DOCKER_IMAGE="sha256:e06453fe869556ea3e63572a935aed4261337b261fdf7bda370472b0587409a9"
|
14 |
|
|
|
7 |
|
8 |
import requests
|
9 |
|
10 |
+
SERVER_ADRESS="https://faircompute.com:8000/api/v1"
|
11 |
+
#SERVER_ADRESS="http://localhost:8000/api/v1"
|
12 |
DOCKER_IMAGE="faircompute/stable-diffusion:pytorch-1.13.1-cu116"
|
13 |
#DOCKER_IMAGE="sha256:e06453fe869556ea3e63572a935aed4261337b261fdf7bda370472b0587409a9"
|
14 |
|