trifonova commited on
Commit
7ad1835
·
1 Parent(s): a01e50d

Set gallery size to 1 and server to fair

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. fair.py +2 -2
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, image, image, 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=[2], height="auto")
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
- #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
 
 
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