Badr AlKhamissi commited on
Commit
e53cddc
1 Parent(s): 6ee182d

added collage

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -29,7 +29,7 @@ from diffusers import StableDiffusionPipeline
29
 
30
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
31
 
32
- model = None
33
  model = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5").to(device)
34
 
35
  from typing import Mapping
@@ -65,6 +65,8 @@ if (SPACE_ID := os.getenv('SPACE_ID')) is not None:
65
  else:
66
  DESCRIPTION = DESCRIPTION.replace("either", "")
67
 
 
 
68
 
69
  warnings.filterwarnings("ignore")
70
 
@@ -312,9 +314,9 @@ with gr.Blocks() as demo:
312
  run = gr.Button('Generate')
313
 
314
  with gr.Column():
315
- result0 = gr.Image(type="filepath", label="Initial Word").style(height=333)
316
- result1 = gr.Image(type="filepath", label="Optimization Process").style(height=333)
317
- result2 = gr.Image(type="filepath", label="Final Result",visible=False).style(height=333)
318
 
319
 
320
  with gr.Row():
 
29
 
30
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
31
 
32
+ # model = None
33
  model = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5").to(device)
34
 
35
  from typing import Mapping
 
65
  else:
66
  DESCRIPTION = DESCRIPTION.replace("either", "")
67
 
68
+ DESCRIPTION += "<img src='https://raw.githubusercontent.com/BKHMSI/Word-As-Image-Ar/main/collage.gif' alt='Example of Outputs'/>"
69
+
70
 
71
  warnings.filterwarnings("ignore")
72
 
 
314
  run = gr.Button('Generate')
315
 
316
  with gr.Column():
317
+ result0 = gr.Image(type="filepath", label="Initial Word").style(height=170)
318
+ result1 = gr.Image(type="filepath", label="Optimization Process").style(height=300)
319
+ result2 = gr.Image(type="filepath", label="Final Result",visible=False).style(height=100)
320
 
321
 
322
  with gr.Row():