Omnibus commited on
Commit
44cf572
1 Parent(s): d53d169

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -100,13 +100,13 @@ def run_script1(url: str, height: int, width: int, check_b,check_h):
100
  else:
101
  return None, '<center>Please enter a valid URL of a website/host.',out_box,out
102
 
103
- def run_script(chat: list, height: int, width: int, check_b,check_h,wait_time):
104
  mes_box=[]
105
  out_box=[]
106
  uid=uuid.uuid4()
107
  out=None
108
  is_url=True
109
- url=f'https://omnibus-snap.hf.space/?chat={chat}&__theme=emerald'
110
 
111
  if is_url:
112
  options = webdriver.ChromeOptions()
@@ -189,7 +189,9 @@ with gr.Blocks() as app:
189
  stop_btn=gr.Button("Stop")
190
 
191
  with gr.Column():
192
- check_h=gr.Checkbox(label="Show Header", value=True)
 
 
193
  check_b=gr.CheckboxGroup(label="Chatblocks", choices=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20], value=[1])
194
  with gr.Row():
195
  height=gr.Number(label="Height", value=4096)
@@ -202,6 +204,6 @@ with gr.Blocks() as app:
202
  outim = gr.Image()
203
  prev=gr.HTML()
204
  #load_btn.click(load_frame,inp,prev)
205
- go = btn.click(run_script,[inp,height,width,check_b,check_h,wait_t],[outim,message,outgal,out])
206
  stop_btn.click(None,None,None,cancels=go)
207
  app.queue(default_concurrency_limit=5).launch()
 
100
  else:
101
  return None, '<center>Please enter a valid URL of a website/host.',out_box,out
102
 
103
+ def run_script(chat: list, height: int, width: int, check_b,check_h,check_t,wait_time):
104
  mes_box=[]
105
  out_box=[]
106
  uid=uuid.uuid4()
107
  out=None
108
  is_url=True
109
+ url=f'https://omnibus-snap.hf.space/?chat={chat}&__theme={check_t}'
110
 
111
  if is_url:
112
  options = webdriver.ChromeOptions()
 
189
  stop_btn=gr.Button("Stop")
190
 
191
  with gr.Column():
192
+ with gr.Row():
193
+ check_t=gr.Radio(label="Theme", choices=["light","dark"], value="dark")
194
+ check_h=gr.Checkbox(label="Show Header", value=True)
195
  check_b=gr.CheckboxGroup(label="Chatblocks", choices=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20], value=[1])
196
  with gr.Row():
197
  height=gr.Number(label="Height", value=4096)
 
204
  outim = gr.Image()
205
  prev=gr.HTML()
206
  #load_btn.click(load_frame,inp,prev)
207
+ go = btn.click(run_script,[inp,height,width,check_b,check_h,check_t,wait_t],[outim,message,outgal,out])
208
  stop_btn.click(None,None,None,cancels=go)
209
  app.queue(default_concurrency_limit=5).launch()