3laa2 commited on
Commit
89dd0cd
·
1 Parent(s): b16a490

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -21
app.py CHANGED
@@ -20,24 +20,25 @@ create = st.button("Create The Model")
20
  if create:
21
  st.title("Text2Image")
22
  t2m_mod = create_model(loc=the_type)
23
-
24
- prom = st.text_input("# Prompt",'')
25
-
26
- c1,c2,c3 = st.columns([1,1,3])
27
- c4,c5 = st.columns(2)
28
- with c1:
29
- bu_1 = st.text_input("Seed",'999')
30
- with c2:
31
- bu_2 = st.text_input("Steps",'12')
32
- with c3:
33
- bu_3 = st.text_input("Number of Images",'1')
34
- with c4:
35
- sl_1 = st.slider("Width",256,1024,128)
36
- with c5:
37
- sl_2 = st.slider("hight",256,1024,128)
38
-
39
- create = st.button("Imagine")
40
- if create:
41
- generator = torch.Generator("cpu").manual_seed(int(bu_1))
42
- img = t2m_mod(prom, width=int(sl_1), height=int(sl_2), num_inference_steps=int(bu_2), generator=generator).images[0]
43
- st.image(img)
 
 
20
  if create:
21
  st.title("Text2Image")
22
  t2m_mod = create_model(loc=the_type)
23
+
24
+
25
+ prom = st.text_input("# Prompt",'')
26
+
27
+ c1,c2,c3 = st.columns([1,1,3])
28
+ c4,c5 = st.columns(2)
29
+ with c1:
30
+ bu_1 = st.text_input("Seed",'999')
31
+ with c2:
32
+ bu_2 = st.text_input("Steps",'12')
33
+ with c3:
34
+ bu_3 = st.text_input("Number of Images",'1')
35
+ with c4:
36
+ sl_1 = st.slider("Width",256,1024,128)
37
+ with c5:
38
+ sl_2 = st.slider("hight",256,1024,128)
39
+
40
+ create = st.button("Imagine")
41
+ if create:
42
+ generator = torch.Generator("cpu").manual_seed(int(bu_1))
43
+ img = t2m_mod(prom, width=int(sl_1), height=int(sl_2), num_inference_steps=int(bu_2), generator=generator).images[0]
44
+ st.image(img)