Omnibus commited on
Commit
c53d8dd
1 Parent(s): 4ff74c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -16
app.py CHANGED
@@ -42,12 +42,8 @@ def sky_fn(inp):
42
  rand = random.randint(1,200)
43
  for i in range(rand):
44
  inp+=" "
45
- #dif = gr.Interface.load("models/stabilityai/stable-diffusion-2-1-base", live=True),
46
- #dif = models[0]
47
  uid=uuid.uuid4()
48
  output=proc1.send_it(inp,5,1)
49
- #in_url=f'https://omnibus-fast-diff.hf.space/file={output[0]}'
50
- #output=dif(inp)
51
  print(output)
52
  outp=Image.open(output[0])
53
  width, height = outp.size
@@ -88,18 +84,17 @@ def star_fn(inp):
88
  with gr.Blocks() as app:
89
  with gr.Row():
90
  with gr.Column():
91
- with gr.Row():
92
- prompt_sky=gr.Textbox(label="Background",value="beautiful landscape, real, 8k")
93
- btn_sky=gr.Button("Make")
94
- with gr.Row():
95
- prompt_star=gr.Textbox(label="Star",value="Colorful Star, blank background")
96
- btn_star=gr.Button("Make")
97
- with gr.Row():
98
- update_game=gr.Button("Use Image")
99
- out_im_sky=gr.Image(type='filepath',width=50)
100
- out_im_star=gr.Image(type='filepath',width=50)
101
- out_sky_url=gr.Textbox(visible=True)
102
- out_star_url=gr.Textbox(visible=True)
103
  #start_prompt=gr.Textbox(value="beautiful landscape, real, 8k",visible=False)
104
  html_game = gr.HTML()
105
 
 
42
  rand = random.randint(1,200)
43
  for i in range(rand):
44
  inp+=" "
 
 
45
  uid=uuid.uuid4()
46
  output=proc1.send_it(inp,5,1)
 
 
47
  print(output)
48
  outp=Image.open(output[0])
49
  width, height = outp.size
 
84
  with gr.Blocks() as app:
85
  with gr.Row():
86
  with gr.Column():
87
+ prompt_sky=gr.Textbox(label="Background",value="beautiful landscape, real, 8k")
88
+ btn_sky=gr.Button("Make")
89
+ out_im_sky=gr.Image(type='filepath',width=50)
90
+ out_sky_url=gr.Textbox(visible=False)
91
+ with gr.Column():
92
+ prompt_star=gr.Textbox(label="Star",value="Colorful Star, blank background")
93
+ btn_star=gr.Button("Make")
94
+ out_im_star=gr.Image(type='filepath',width=50)
95
+ out_star_url=gr.Textbox(visible=False)
96
+ with gr.Row():
97
+ update_game=gr.Button("Use Image")
 
98
  #start_prompt=gr.Textbox(value="beautiful landscape, real, 8k",visible=False)
99
  html_game = gr.HTML()
100